Handle bools

This commit is contained in:
Thomas Pelletier
2021-03-14 15:52:22 -04:00
parent 3760527218
commit 04925e4882
5 changed files with 75 additions and 2 deletions
+4 -2
View File
@@ -209,13 +209,15 @@ func (p *parser) parseVal(b []byte) (ast.Node, []byte, error) {
if !scanFollowsTrue(b) {
return node, nil, fmt.Errorf("expected 'true'")
}
// TODO
node.Kind = ast.Bool
node.Data = b[:4]
return node, b[4:], nil
case 'f':
if !scanFollowsFalse(b) {
return node, nil, fmt.Errorf("expected 'false'")
}
// TODO
node.Kind = ast.Bool
node.Data = b[:5]
return node, b[5:], nil
case '[':
node.Kind = ast.Array