1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00

Assign boolean literals using leafNode.

This commit is contained in:
Rob Rix 2018-06-27 14:16:00 -04:00
parent fb1003b799
commit 21e18dcea9

View File

@ -54,8 +54,9 @@ string :: Assignment Term
string = makeTerm <$> symbol String <*> (Literal.TextElement <$> source)
boolean :: Assignment Term
boolean = makeTerm <$> symbol Grammar.True <*> (Literal.true <$ rawSource)
<|> makeTerm <$> symbol Grammar.False <*> (Literal.false <$ rawSource)
boolean = toTerm
( leafNode Grammar.True $> Literal.true
<|> leafNode Grammar.False $> Literal.false)
none :: Assignment Term
none = toTerm (leafNode Null $> Literal.Null)