basically finish AST build

This commit is contained in:
2024-08-11 15:38:53 +00:00
parent 996995ecf7
commit 9aa23caaa9
9 changed files with 824 additions and 275 deletions

View File

@ -27,7 +27,7 @@ statement
define_statement : type (LBRACKET RBRACKET)* ID (ASSIGN expr)? (COMMA ID (ASSIGN expr)?)* SEMICOLON;
expr
: basic_expr #basic_expression
| NEW type (LBRACKET expr? RBRACKET)*constant? #new_array_expression
| NEW type (LBRACKET expr? RBRACKET)+constant? #new_array_expression
| NEW type LPAREN RPAREN #new_construct_expression
| NEW type #new_expression
| expr DOT (ID|(ID LPAREN (expr (COMMA expr)*)? RPAREN)) #access_expression