ready to build AST

This commit is contained in:
2024-08-08 13:05:56 +00:00
parent f1eb6abcc1
commit 9900d5aaf3
23 changed files with 683 additions and 110 deletions

View File

@ -52,12 +52,12 @@ expr
;
basic_expr
: THIS
| LPAREN expr RPAREN
| ID
| ID LPAREN (expr (COMMA expr)*)? RPAREN
| formatted_string
| constant
: THIS #this_expr
| LPAREN expr RPAREN #paren_expr
| ID #id_expr
| ID LPAREN (expr (COMMA expr)*)? RPAREN #function_call_expr
| formatted_string #formatted_string_expr
| constant #constant_expr
;
formatted_string : FORMAT_STRING_WHOLE | (FORMAT_STRING_HEAD expr (FORMAT_STRING_BODY expr)*? FORMAT_STRING_TAIL);