about summary refs log tree commit diff
path: root/src/fix-ng/primops.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-11-05T16·27+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-11-05T16·27+0000
commitfa18f1f184ba89b3dfe592e77a276da42d326f42 (patch)
tree886b09a52f176178190f24c095192fac32b11bab /src/fix-ng/primops.cc
parente17e95a82892b31c8063f2ace1b21c79e82e6f6d (diff)
* Assertions.
* Logical operators (!, &&, ||, ->).

Diffstat (limited to 'src/fix-ng/primops.cc')
-rw-r--r--src/fix-ng/primops.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/fix-ng/primops.cc b/src/fix-ng/primops.cc
index ef0fd354ef6d..f5a278f669b5 100644
--- a/src/fix-ng/primops.cc
+++ b/src/fix-ng/primops.cc
@@ -225,3 +225,16 @@ Expr primToString(EvalState & state, Expr arg)
         return ATmake("Str(<str>)", s);
     else throw badTerm("cannot coerce to string", arg);
 }
+
+
+Expr primNull(EvalState & state, Expr arg)
+{
+    return ATmake("Null");
+}
+
+
+Expr primIsNull(EvalState & state, Expr arg)
+{
+    arg = evalExpr(state, arg);
+    return makeBool(ATmatch(arg, "Null"));
+}