add field assignment to statements

This commit is contained in:
2020-03-07 00:12:53 +01:00
parent 86e77d1609
commit ed4c901c6c

View File

@@ -40,6 +40,7 @@ statement
| if_statement
| variable_declaration SCOL
| variable_assignment SCOL
| field_assignment SCOL
| return_statement
| whileLoop
| doWhileLoop
@@ -68,6 +69,10 @@ variable_assignment
: IDENT EQUAL expression
;
field_assignment
: IDENT (DOT IDENT)+ EQUAL expression
;
return_statement
: RETURN expression SCOL
;