Dylan Baker
21bf43c0e0
Don't allow binding to an unbound variable
5 anni fa
Dylan Baker
0a4d8d334d
Implement lambdas
5 anni fa
Dylan Baker
9a3f2a6340
Fix quotation evaluation
5 anni fa
Dylan Baker
987328470b
Evaluate lists that are not applications
5 anni fa
Dylan Baker
39369d9375
Display quoted values in repl
5 anni fa
Dylan Baker
1e1f64a141
Implement quoted values
5 anni fa
Dylan Baker
26a93cd9f0
Replace Application with List
I see what I was going for with the Application AST node but
Chervil is a Lisp after all and lists are the fundamental data
structure. The direct reason I wanted to do this was for quoted values,
since a quoted list isn't an application.
5 anni fa
Dylan Baker
b3ce44f30a
Tweak object displays in REPL
5 anni fa
Dylan Baker
2242484bd6
Don't leave variables bound after function execution :(
5 anni fa
Dylan Baker
1954d89211
Allow recursive functions & closures
5 anni fa
Dylan Baker
1a9bdbfc52
Evaluate conditionals
5 anni fa
Dylan Baker
b3735912f5
Parse conditionals
5 anni fa
Dylan Baker
2924a9b9dc
Sometimes we have an AST node and sometimes we have a raw value
5 anni fa
Dylan Baker
1cd0480079
Return error for unbound variable/function
5 anni fa
Dylan Baker
48b94af6f6
Store function name on the function node
5 anni fa
Dylan Baker
0b46e6cb5a
Evaluate identifier referents
5 anni fa
Dylan Baker
f34112d2c8
Clean up REPL
5 anni fa
Dylan Baker
616231a55b
Evaluate user-defined functions
5 anni fa
Dylan Baker
71b2364613
Parse function definitions
5 anni fa
Dylan Baker
03bc1d2184
Implement booleans
5 anni fa
Dylan Baker
dea415bdba
Evaluate addition
5 anni fa
Dylan Baker
2910625b1a
Number and string accept an environment as well
5 anni fa
Dylan Baker
fa2699e483
Evaluate definition/indentifier
5 anni fa
Dylan Baker
e3ab53a63e
Parse definition
5 anni fa
Dylan Baker
f31ce80c4b
Evaluate strings
5 anni fa
Dylan Baker
5a23b3dee7
Parse strings
5 anni fa
Dylan Baker
7c02e3cfe9
Evaluate numbers
5 anni fa
Dylan Baker
2dfba579de
Parse application
5 anni fa
Dylan Baker
7b554d0095
Parse identifiers
5 anni fa
Dylan Baker
3d230605bf
Parse numbers
5 anni fa