1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00

Assign break & continue statements.

This commit is contained in:
Rob Rix 2017-04-19 14:03:14 -04:00
parent 777a4a0392
commit aa2a1d7d2c

View File

@ -26,6 +26,8 @@ type Syntax' =
, Literal.Integer
, Literal.String
, Literal.Symbol
, Statement.Break
, Statement.Continue
, Statement.If
, Statement.Return
, Statement.Yield
@ -67,6 +69,8 @@ method = term () <$ symbol Method
statement :: Assignment Grammar (Term Syntax ())
statement = exit Statement.Return Return
<|> exit Statement.Yield Yield
<|> exit Statement.Break Break
<|> exit Statement.Continue Next
<|> expr
where exit construct sym = term () . construct <$ symbol sym <*> children (optional (symbol ArgumentList *> children expr))