diff options
Diffstat (limited to 'src/MoonP/moon_parser.cpp')
-rw-r--r-- | src/MoonP/moon_parser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/MoonP/moon_parser.cpp b/src/MoonP/moon_parser.cpp index 7de2a84..4f12a34 100644 --- a/src/MoonP/moon_parser.cpp +++ b/src/MoonP/moon_parser.cpp | |||
@@ -209,7 +209,7 @@ MoonParser::MoonParser() { | |||
209 | 209 | ||
210 | WithExp = ExpList >> -Assign; | 210 | WithExp = ExpList >> -Assign; |
211 | 211 | ||
212 | With = key("with") >> DisableDo >> ensure(WithExp, PopDo) >> -key("do") >> Body; | 212 | With = key("with") >> -existential_op >> DisableDo >> ensure(WithExp, PopDo) >> -key("do") >> Body; |
213 | SwitchCase = key("when") >> ExpList >> -key("then") >> Body; | 213 | SwitchCase = key("when") >> ExpList >> -key("then") >> Body; |
214 | SwitchElse = key("else") >> Body; | 214 | SwitchElse = key("else") >> Body; |
215 | 215 | ||
@@ -231,6 +231,7 @@ MoonParser::MoonParser() { | |||
231 | Unless = key("unless") >> Seperator >> IfCond >> -key("then") >> Body >> *IfElseIf >> -IfElse; | 231 | Unless = key("unless") >> Seperator >> IfCond >> -key("then") >> Body >> *IfElseIf >> -IfElse; |
232 | 232 | ||
233 | While = key("while") >> DisableDo >> ensure(Exp, PopDo) >> -key("do") >> Body; | 233 | While = key("while") >> DisableDo >> ensure(Exp, PopDo) >> -key("do") >> Body; |
234 | Repeat = key("repeat") >> Body >> Break >> *EmptyLine >> CheckIndent >> key("until") >> Exp; | ||
234 | 235 | ||
235 | for_step_value = sym(',') >> White >> Exp; | 236 | for_step_value = sym(',') >> White >> Exp; |
236 | for_args = Space >> Variable >> sym('=') >> Exp >> sym(',') >> White >> Exp >> -for_step_value; | 237 | for_args = Space >> Variable >> sym('=') >> Exp >> sym(',') >> White >> Exp >> -for_step_value; |
@@ -538,10 +539,9 @@ MoonParser::MoonParser() { | |||
538 | 539 | ||
539 | statement_appendix = (if_line | unless_line | CompInner) >> Space; | 540 | statement_appendix = (if_line | unless_line | CompInner) >> Space; |
540 | Statement = ( | 541 | Statement = ( |
541 | Import | While | For | ForEach | | 542 | Import | While | Repeat | For | ForEach | |
542 | Return | Local | Global | Export | | 543 | Return | Local | Global | Export | Macro | |
543 | Macro | Space >> BreakLoop | Label | | 544 | Space >> BreakLoop | Label | Goto | Backcall | ExpListAssign |
544 | Goto | Backcall | ExpListAssign | ||
545 | ) >> Space >> | 545 | ) >> Space >> |
546 | -statement_appendix; | 546 | -statement_appendix; |
547 | 547 | ||