Add null literal
Some checks failed
Build / build (push) Successful in 1m30s
Test / build (push) Has been cancelled

This commit is contained in:
Chuck Smith
2024-03-19 16:33:13 -04:00
parent 60d27f09d7
commit 97eeae0c1a
9 changed files with 59 additions and 0 deletions

View File

@@ -87,6 +87,9 @@ func Eval(node ast.Node, env *object.Environment) object.Object {
case *ast.Boolean:
return nativeBoolToBooleanObject(node.Value)
case *ast.Null:
return NULL
case *ast.PrefixExpression:
right := Eval(node.Right, env)
if isError(right) {