mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
Assign boolean literals using leafNode.
This commit is contained in:
parent
fb1003b799
commit
21e18dcea9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user