Skip to content

Commit

Permalink
Parse when equations comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinffernandez committed Apr 20, 2023
1 parent eb078a3 commit b2c6bf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mmoc/ast/parser/mocc.y
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ equation:
| simple_expression TOKEQUAL expression comment { $$ = newAST_Equation_Equality($1,$3,$4); }
| primary { $$ = newAST_Equation_Call($1); } /* This must be a call only!!!!*/
| for_equation comment { $$ = $1; }
| when_equation comment { $$ = $1; }
| when_equation { $$ = $1; }
;

for_indices:
Expand All @@ -631,7 +631,7 @@ for_equation:
;

when_equation:
TOKWHEN expression TOKTHEN equation_list opt_else_when TOKEND TOKWHEN { $$ = newAST_Equation_When($2,$4,$5); }
TOKWHEN expression TOKTHEN equation_list opt_else_when TOKEND TOKWHEN comment { $$ = newAST_Equation_When($2,$4,$5,$8); }

;

Expand Down

0 comments on commit b2c6bf7

Please sign in to comment.