diff --git a/src/Language/Ruby/Syntax.hs b/src/Language/Ruby/Syntax.hs index 0d991711a..368244877 100644 --- a/src/Language/Ruby/Syntax.hs +++ b/src/Language/Ruby/Syntax.hs @@ -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