diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-15 15:33:47 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-15 15:33:47 -0400 |
| commit | e422079fcced744e3a6247aeb12a09a658989072 (patch) | |
| tree | 393d5e52ba67dcc822ccfa9a812198edda5e735d /parse.c | |
| parent | 259c7efcf8c3808d8151d8e15f1167ad2b6f2ca7 (diff) | |
Add a Byte datatype
Diffstat (limited to 'parse.c')
| -rw-r--r-- | parse.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -506,12 +506,12 @@ PARSER(parse_int) { return NewAST(ctx->file, start, pos, Num, .n=n, .bits=64); } - match(&pos, "_"); auto bits = IBITS_UNSPECIFIED; - if (match(&pos, "i64")) bits = IBITS64; - else if (match(&pos, "i32")) bits = IBITS32; - else if (match(&pos, "i16")) bits = IBITS16; - else if (match(&pos, "i8")) bits = IBITS8; + if (match(&pos, "[64]")) bits = IBITS64; + else if (match(&pos, "[32]")) bits = IBITS32; + else if (match(&pos, "[16]")) bits = IBITS16; + else if (match(&pos, "[8]")) bits = IBITS8; + else if (match(&pos, "[B]")) bits = IBITS_BYTE; // else if (match(&pos, ".") || match(&pos, "e")) return NULL; // looks like a float |
