mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Assign boolean literals.
This commit is contained in:
parent
94cb31e95e
commit
572fbbeb2a
@ -74,4 +74,8 @@ if' :: Assignment Grammar (Program a)
|
|||||||
if' = wrapU <$ rule If <*> children (Statement.If <$> expr <*> expr <*> expr)
|
if' = wrapU <$ rule If <*> children (Statement.If <$> expr <*> expr <*> expr)
|
||||||
|
|
||||||
expr :: Assignment Grammar (Program a)
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user