X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=blobdiff_plain;f=csrc%2Foceani.mdc;h=af7768dd1d763638d5142987c895d108d2a9f0a1;hp=478186ae19d81f0eadea542c19166c4a1794aacf;hb=cbbbc8ec0230cf82765da33ecff7be9824006519;hpb=3a83d91ef3b37d50680c15c00fc4ee44cb70c6ea diff --git a/csrc/oceani.mdc b/csrc/oceani.mdc index 478186a..af7768d 100644 --- a/csrc/oceani.mdc +++ b/csrc/oceani.mdc @@ -3557,7 +3557,7 @@ defined. case Xcond_statement: free_cond_statement(cast(cond_statement, e)); break; ###### ComplexStatement Grammar - | CondStatement $$NEWLINE ${ $0 = $<1; }$ + | CondStatement ${ $0 = $<1; }$ ###### Grammar @@ -3585,9 +3585,11 @@ defined. $0->condpart = $1.condpart; $1.condpart = NULL; $0->dopart = $1.dopart; $1.dopart = NULL; }$ - | SwitchPart CondSuffix ${ - $0 = $<2; + | SwitchPart CasePart CondSuffix ${ + $0 = $<3; $0->condpart = $<1; + $2->next = $0->casepart; + $0->casepart = $<2; }$ | IfPart IfSuffix ${ $0 = $<2;