Skip to content

Commit

Permalink
Fixed assignment to expression
Browse files Browse the repository at this point in the history
  • Loading branch information
KyrylR committed Aug 9, 2024
1 parent 1b73e7d commit 99e313a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grammar/Circom.g4
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ functionStmt
: functionBlock
| ID SELF_OP ';'
| varDeclaration ';'
| expression (ASSIGNMENT | ASSIGNMENT_OP) expression ';'
| identifier (ASSIGNMENT | ASSIGNMENT_OP) expression ';'
| 'if' parExpression functionStmt ('else' functionStmt)?
| 'while' parExpression functionStmt
| 'for' '(' forControl ')' functionStmt
Expand Down Expand Up @@ -61,7 +61,7 @@ templateStmt
| signalDeclaration ';'
| componentDeclaration ';'
| blockInstantiation ';'
| expression (ASSIGNMENT | CONSTRAINT_EQ) expression ';'
| identifier (ASSIGNMENT | CONSTRAINT_EQ) expression ';'
| (primary | (identifier '.' identifier)) (LEFT_ASSIGNMENT | ASSIGNMENT_OP) expression ';'
| expression RIGHT_ASSIGNMENT primary ';'
| '_' (ASSIGNMENT | LEFT_ASSIGNMENT) (expression | blockInstantiation) ';'
Expand Down

0 comments on commit 99e313a

Please sign in to comment.