undefmacro

This commit is contained in:
2021-07-22 16:36:30 -06:00
parent ddad290406
commit d02c85c322
3 changed files with 22 additions and 3 deletions

View File

@@ -28,4 +28,8 @@ class MacroTestCase extends Test {
Assert.equals(9, print);
Assert.equals(9, aliasValue());
}
function testUndefMacro() {
Assert.equals(11, andValue());
}
}

View File

@@ -43,4 +43,9 @@
(defalias &ident alias 5)
(undefalias &ident alias)
(defvar alias 9)
(defun aliasValue [] alias)
(defun aliasValue [] alias)
// If for whatever reason, you wanted to make a function called and
(undefmacro and)
(defun and [a b] (+ a b))
(defun andValue [] (and 5 6))