X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=blobdiff_plain;f=csrc%2Findent_test.mdc;h=983d223dd6135f08b8e6fa3eb336a0ab7e2a3062;hp=d8e945ec3dab627994bb91492c080aac1d56b1a9;hb=d5e7191c75eb2479930d8ee6790772c71de32edb;hpb=e05db65dccf8c29b430af062a21f085775192161 diff --git a/csrc/indent_test.mdc b/csrc/indent_test.mdc index d8e945e..983d223 100644 --- a/csrc/indent_test.mdc +++ b/csrc/indent_test.mdc @@ -187,12 +187,14 @@ $*statement | IfStatement ${ $0 = $<1; }$ | Statement NEWLINE ${ $0 = $<1; }$ - IfStatement -> if Expression Block OptNL ${ + $RIGHT else + + IfStatement -> if Expression Block OptNL $$else ${ $0 = calloc(1, sizeof(struct statement)); $0->expr = $<2; $0->thenpart = $<3; }$ - | if Expression : SimpleStatements ${ + | if Expression : SimpleStatements $$else ${ $0 = calloc(1, sizeof(struct statement)); $0->expr = $<2; $0->thenpart = $<4;