diff options
Diffstat (limited to 'src/MoonP/moon_parser.cpp')
-rw-r--r-- | src/MoonP/moon_parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/MoonP/moon_parser.cpp b/src/MoonP/moon_parser.cpp index d3c0ed2..6d1b86c 100644 --- a/src/MoonP/moon_parser.cpp +++ b/src/MoonP/moon_parser.cpp | |||
@@ -198,7 +198,7 @@ rule IfCond = Exp >> -Assign; | |||
198 | rule IfElseIf = -(Break >> *EmptyLine >> CheckIndent) >> key("elseif") >> IfCond >> -key("then") >> Body; | 198 | rule IfElseIf = -(Break >> *EmptyLine >> CheckIndent) >> key("elseif") >> IfCond >> -key("then") >> Body; |
199 | rule IfElse = -(Break >> *EmptyLine >> CheckIndent) >> key("else") >> Body; | 199 | rule IfElse = -(Break >> *EmptyLine >> CheckIndent) >> key("else") >> Body; |
200 | rule If = key("if") >> Seperator >> IfCond >> -key("then") >> Body >> *IfElseIf >> -IfElse; | 200 | rule If = key("if") >> Seperator >> IfCond >> -key("then") >> Body >> *IfElseIf >> -IfElse; |
201 | rule Unless = key("unless") >> Seperator >> IfCond >> -key("then") >> Body >> *IfElseIf >> -IfElse; | 201 | rule Unless = key("unless") >> Seperator >> IfCond >> -key("then") >> Body >> *IfElseIf >> -IfElse; |
202 | 202 | ||
203 | rule While = key("while") >> DisableDo >> ensure(Exp, PopDo) >> -key("do") >> Body; | 203 | rule While = key("while") >> DisableDo >> ensure(Exp, PopDo) >> -key("do") >> Body; |
204 | 204 | ||
@@ -510,7 +510,7 @@ rule SimpleValue = | |||
510 | 510 | ||
511 | rule ExpListAssign = ExpList >> -(Update | Assign); | 511 | rule ExpListAssign = ExpList >> -(Update | Assign); |
512 | 512 | ||
513 | rule if_else_line = key("if") >> Exp >> (key("else") >> Exp | default_value); | 513 | rule if_else_line = key("if") >> Exp >> -Assign >> (key("else") >> Exp | default_value); |
514 | rule unless_line = key("unless") >> Exp; | 514 | rule unless_line = key("unless") >> Exp; |
515 | 515 | ||
516 | rule statement_appendix = (if_else_line | unless_line | CompInner) >> Space; | 516 | rule statement_appendix = (if_else_line | unless_line | CompInner) >> Space; |