1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00

Assign number literals using leafNode.

This commit is contained in:
Rob Rix 2018-06-27 14:17:33 -04:00
parent e20fcf4ec5
commit 4f048dd1e0

View File

@ -48,7 +48,7 @@ array :: Assignment Term
array = makeTerm <$> symbol Array <*> children (Literal.Array <$> many jsonValue)
number :: Assignment Term
number = makeTerm <$> symbol Number <*> (Literal.Float <$> source)
number = toTerm (Literal.Float <$> leafNode Number)
string :: Assignment Term
string = toTerm (Literal.TextElement <$> leafNode String)