highly experimental quote and eval

This commit is contained in:
2021-11-23 22:17:59 -07:00
parent 0be08fb13c
commit 1dddc5de65
6 changed files with 103 additions and 5 deletions

View File

@@ -322,6 +322,11 @@ class BasicTestCase extends Test {
function testExpComment() {
_testExpComment();
}
function testEval() {
_testEvalStatic();
_testEval();
}
}
class BasicObject {

View File

@@ -578,4 +578,15 @@
(Assert.equals 2 (arrowSyntax))))
(function _testExpComment []
(Assert.equals 15 (+ **6 5 **(- 5 11) 5 (+ 5 **(20 9)))))
(Assert.equals 15 (+ **6 5 **(- 5 11) 5 (+ 5 **(20 9)))))
(var staticValue 9)
(prop value 2)
(method _testEval []
(Assert.equals 9 (eval 'staticValue))
(Assert.equals 2 (eval 'value))
(Assert.equals 11 (eval '(+ staticValue value))))
(function _testEvalStatic []
(Assert.equals 9 (eval 'staticValue))
(assertThrows (eval 'value)))