| ... | @@ -278,62 +278,62 @@ pub const Token = struct { | ... | @@ -278,62 +278,62 @@ pub const Token = struct { |
| 278 | | 278 | |
| 279 | // TODO extensions | 279 | // TODO extensions |
| 280 | pub const keywords = std.ComptimeStringMap(Id, .{ | 280 | pub const keywords = std.ComptimeStringMap(Id, .{ |
| 281 | .{"auto", .Keyword_auto}, | 281 | .{ "auto", .Keyword_auto }, |
| 282 | .{"break", .Keyword_break}, | 282 | .{ "break", .Keyword_break }, |
| 283 | .{"case", .Keyword_case}, | 283 | .{ "case", .Keyword_case }, |
| 284 | .{"char", .Keyword_char}, | 284 | .{ "char", .Keyword_char }, |
| 285 | .{"const", .Keyword_const}, | 285 | .{ "const", .Keyword_const }, |
| 286 | .{"continue", .Keyword_continue}, | 286 | .{ "continue", .Keyword_continue }, |
| 287 | .{"default", .Keyword_default}, | 287 | .{ "default", .Keyword_default }, |
| 288 | .{"do", .Keyword_do}, | 288 | .{ "do", .Keyword_do }, |
| 289 | .{"double", .Keyword_double}, | 289 | .{ "double", .Keyword_double }, |
| 290 | .{"else", .Keyword_else}, | 290 | .{ "else", .Keyword_else }, |
| 291 | .{"enum", .Keyword_enum}, | 291 | .{ "enum", .Keyword_enum }, |
| 292 | .{"extern", .Keyword_extern}, | 292 | .{ "extern", .Keyword_extern }, |
| 293 | .{"float", .Keyword_float}, | 293 | .{ "float", .Keyword_float }, |
| 294 | .{"for", .Keyword_for}, | 294 | .{ "for", .Keyword_for }, |
| 295 | .{"goto", .Keyword_goto}, | 295 | .{ "goto", .Keyword_goto }, |
| 296 | .{"if", .Keyword_if}, | 296 | .{ "if", .Keyword_if }, |
| 297 | .{"int", .Keyword_int}, | 297 | .{ "int", .Keyword_int }, |
| 298 | .{"long", .Keyword_long}, | 298 | .{ "long", .Keyword_long }, |
| 299 | .{"register", .Keyword_register}, | 299 | .{ "register", .Keyword_register }, |
| 300 | .{"return", .Keyword_return}, | 300 | .{ "return", .Keyword_return }, |
| 301 | .{"short", .Keyword_short}, | 301 | .{ "short", .Keyword_short }, |
| 302 | .{"signed", .Keyword_signed}, | 302 | .{ "signed", .Keyword_signed }, |
| 303 | .{"sizeof", .Keyword_sizeof}, | 303 | .{ "sizeof", .Keyword_sizeof }, |
| 304 | .{"static", .Keyword_static}, | 304 | .{ "static", .Keyword_static }, |
| 305 | .{"struct", .Keyword_struct}, | 305 | .{ "struct", .Keyword_struct }, |
| 306 | .{"switch", .Keyword_switch}, | 306 | .{ "switch", .Keyword_switch }, |
| 307 | .{"typedef", .Keyword_typedef}, | 307 | .{ "typedef", .Keyword_typedef }, |
| 308 | .{"union", .Keyword_union}, | 308 | .{ "union", .Keyword_union }, |
| 309 | .{"unsigned", .Keyword_unsigned}, | 309 | .{ "unsigned", .Keyword_unsigned }, |
| 310 | .{"void", .Keyword_void}, | 310 | .{ "void", .Keyword_void }, |
| 311 | .{"volatile", .Keyword_volatile}, | 311 | .{ "volatile", .Keyword_volatile }, |
| 312 | .{"while", .Keyword_while}, | 312 | .{ "while", .Keyword_while }, |
| 313 | | 313 | |
| 314 | // ISO C99 | 314 | // ISO C99 |
| 315 | .{"_Bool", .Keyword_bool}, | 315 | .{ "_Bool", .Keyword_bool }, |
| 316 | .{"_Complex", .Keyword_complex}, | 316 | .{ "_Complex", .Keyword_complex }, |
| 317 | .{"_Imaginary", .Keyword_imaginary}, | 317 | .{ "_Imaginary", .Keyword_imaginary }, |
| 318 | .{"inline", .Keyword_inline}, | 318 | .{ "inline", .Keyword_inline }, |
| 319 | .{"restrict", .Keyword_restrict}, | 319 | .{ "restrict", .Keyword_restrict }, |
| 320 | | 320 | |
| 321 | // ISO C11 | 321 | // ISO C11 |
| 322 | .{"_Alignas", .Keyword_alignas}, | 322 | .{ "_Alignas", .Keyword_alignas }, |
| 323 | .{"_Alignof", .Keyword_alignof}, | 323 | .{ "_Alignof", .Keyword_alignof }, |
| 324 | .{"_Atomic", .Keyword_atomic}, | 324 | .{ "_Atomic", .Keyword_atomic }, |
| 325 | .{"_Generic", .Keyword_generic}, | 325 | .{ "_Generic", .Keyword_generic }, |
| 326 | .{"_Noreturn", .Keyword_noreturn}, | 326 | .{ "_Noreturn", .Keyword_noreturn }, |
| 327 | .{"_Static_assert", .Keyword_static_assert}, | 327 | .{ "_Static_assert", .Keyword_static_assert }, |
| 328 | .{"_Thread_local", .Keyword_thread_local}, | 328 | .{ "_Thread_local", .Keyword_thread_local }, |
| 329 | | 329 | |
| 330 | // Preprocessor directives | 330 | // Preprocessor directives |
| 331 | .{"include", .Keyword_include}, | 331 | .{ "include", .Keyword_include }, |
| 332 | .{"define", .Keyword_define}, | 332 | .{ "define", .Keyword_define }, |
| 333 | .{"ifdef", .Keyword_ifdef}, | 333 | .{ "ifdef", .Keyword_ifdef }, |
| 334 | .{"ifndef", .Keyword_ifndef}, | 334 | .{ "ifndef", .Keyword_ifndef }, |
| 335 | .{"error", .Keyword_error}, | 335 | .{ "error", .Keyword_error }, |
| 336 | .{"pragma", .Keyword_pragma}, | 336 | .{ "pragma", .Keyword_pragma }, |
| 337 | }); | 337 | }); |
| 338 | | 338 | |
| 339 | // TODO do this in the preprocessor | 339 | // TODO do this in the preprocessor |