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

Assign boolean literals.

This commit is contained in:
Rob Rix 2017-04-13 15:48:28 -04:00
parent 94cb31e95e
commit 572fbbeb2a

View File

@ -74,4 +74,8 @@ if' :: Assignment Grammar (Program a)
if' = wrapU <$ rule If <*> children (Statement.If <$> expr <*> expr <*> expr)
expr :: Assignment Grammar (Program a)
expr = if'
expr = if' <|> literal
literal :: Assignment Grammar (Program a)
literal = wrapU (Literal.Boolean Prologue.True) <$ rule Language.Ruby.Syntax.True <* content
<|> wrapU (Literal.Boolean Prologue.False) <$ rule Language.Ruby.Syntax.False <* content