evaluator: add environment, make definitions work, add tests
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
tests
|
||||
testDefineExpression
|
||||
ph parseAndEval: '(define pi 3.14)'.
|
||||
self
|
||||
assert: (ph parseAndEval: 'pi')
|
||||
equals: 3.14
|
@@ -0,0 +1,6 @@
|
||||
tests
|
||||
testEvalExpressionReassignment
|
||||
ph parseAndEval: '(define pi 3.14)'.
|
||||
ph parseAndEval: '(define pi2 pi)'.
|
||||
ph parseAndEval: '(define pi 6.28)'.
|
||||
self assert: (ph parseAndEval: 'pi2') equals: 3.14
|
Reference in New Issue
Block a user