mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Update grammar to interpret $Foo = int as a statement.
This commit is contained in:
@@ -401,13 +401,11 @@ empty
|
|||||||
|
|
||||||
assignment_expr
|
assignment_expr
|
||||||
: ternary_expr
|
: ternary_expr
|
||||||
| CT_TYPE_IDENT '=' type
|
|
||||||
| unary_expr assignment_op assignment_expr
|
| unary_expr assignment_op assignment_expr
|
||||||
;
|
;
|
||||||
|
|
||||||
assignment_stmt_expr
|
assignment_stmt_expr
|
||||||
: ternary_stmt_expr
|
: ternary_stmt_expr
|
||||||
| CT_TYPE_IDENT '=' type
|
|
||||||
| unary_stmt_expr assignment_op assignment_expr
|
| unary_stmt_expr assignment_op assignment_expr
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -873,6 +871,7 @@ asm_block_stmt
|
|||||||
statement
|
statement
|
||||||
: compound_statement
|
: compound_statement
|
||||||
| var_stmt
|
| var_stmt
|
||||||
|
| CT_TYPE_IDENT '=' type ';'
|
||||||
| declaration_stmt
|
| declaration_stmt
|
||||||
| return_stmt
|
| return_stmt
|
||||||
| if_stmt
|
| if_stmt
|
||||||
|
|||||||
Reference in New Issue
Block a user