node: transform null->nil; normalise case for true/false

This commit is contained in:
mappu 2020-04-08 20:33:53 +12:00
parent fc41691e4a
commit 4f86ec11e7

View File

@ -1325,6 +1325,15 @@ func (this *conversionState) resolveName(n node.Node) (string, error) {
} else if strings.ToLower(ret) == "static" {
return "", parseErr{n, fmt.Errorf("'static::' is not yet supported")}
} else if strings.ToLower(ret) == "true" {
return "true", nil
} else if strings.ToLower(ret) == "false" {
return "false", nil
} else if strings.ToLower(ret) == "null" {
return "nil", nil
}
return ret, nil