From ca6f2ec64941953f0111a64b7acf4cf6fb31929a Mon Sep 17 00:00:00 2001 From: A404M Date: Sat, 31 May 2025 15:09:23 +0330 Subject: add array access support to arrays --- src/compiler/parser.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/compiler/parser.c') 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); -- cgit v1.2.3