diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-05-31 15:09:23 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-05-31 15:09:23 +0330 |
commit | ca6f2ec64941953f0111a64b7acf4cf6fb31929a (patch) | |
tree | 8c0abdcd8d202cdee295e2f4247ac6d1688a09d8 /src/compiler/parser.c | |
parent | 3c53293e9b2c2f9106da805d26b5eab9dff56225 (diff) |
add array access support to arrays
Diffstat (limited to 'src/compiler/parser.c')
-rw-r--r-- | src/compiler/parser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/parser.c b/src/compiler/parser.c index 903a8af..97edae4 100644 --- a/src/compiler/parser.c +++ b/src/compiler/parser.c @@ -1307,6 +1307,11 @@ ParserNode *parserNumber(LexerNode *node, ParserNode *parent) { parserNode = newParserNode(PARSER_TOKEN_VALUE_INT, node->str_begin, node->str_end, metadata, parent); break; + case 'i': + case 'I': + case 'u': + case 'U': + goto DEFAULT; default: NOT_IMPLEMENTED; } @@ -1314,6 +1319,7 @@ ParserNode *parserNumber(LexerNode *node, ParserNode *parent) { } // fall through default: { + DEFAULT: ParserNodeIntType type = getIntType(node->str_begin, node->str_end); u64 value = decimalToU64(node->str_begin, node->str_end - getIntTypeSize(type), &success); |