From b2c6bf7d768e103b1957a527f6bf2760eb8170ad Mon Sep 17 00:00:00 2001 From: "joaquin.f.fernandez" Date: Thu, 20 Apr 2023 14:27:20 -0300 Subject: [PATCH] Parse when equations comment. --- src/mmoc/ast/parser/mocc.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mmoc/ast/parser/mocc.y b/src/mmoc/ast/parser/mocc.y index 42df7d4e..7376b1ab 100644 --- a/src/mmoc/ast/parser/mocc.y +++ b/src/mmoc/ast/parser/mocc.y @@ -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: @@ -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); } ;