aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/parser.c
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-05-16 01:20:33 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-05-16 01:20:33 +0330
commit42eb5e5d3f10c3a9187dcf8edd7c023a3ea10dcd (patch)
tree78862ab27c3b1faf2d9ed5722bceb0264602bd1a /src/compiler/parser.c
parent0b8d272292ca3f7fdb44efac65f012b484d962a2 (diff)
fix access operator and some stuff to make break work
Diffstat (limited to 'src/compiler/parser.c')
-rw-r--r--src/compiler/parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/parser.c b/src/compiler/parser.c
index 1fd2e06..ebfd66f 100644
--- a/src/compiler/parser.c
+++ b/src/compiler/parser.c
@@ -60,6 +60,7 @@ const char *PARSER_TOKEN_STRINGS[] = {
"PARSER_TOKEN_TYPE_SHAPE_SHIFTER",
"PARSER_TOKEN_KEYWORD_PUTC",
+ "PARSER_TOKEN_KEYWORD_BREAK",
"PARSER_TOKEN_KEYWORD_RETURN",
"PARSER_TOKEN_KEYWORD_IF",
"PARSER_TOKEN_KEYWORD_WHILE",
@@ -1443,6 +1444,7 @@ ParserNode *parserFunctionCall(LexerNode *closing, LexerNode *begin,
if (beforeNode < begin || beforeNode->parserNode == NULL ||
(before = getUntilCommonParent(beforeNode->parserNode, parent)) == NULL ||
!isExpression(before)) {
+ printError(closing->str_begin, closing->str_end, "Bad function call");
UNREACHABLE;
}