Dylan Baker
21bf43c0e0
Don't allow binding to an unbound variable
hace 6 años
Dylan Baker
0a4d8d334d
Implement lambdas
hace 6 años
Dylan Baker
58c66d8435
Implement map
hace 6 años
Dylan Baker
c5189a5c87
Implement cons
hace 6 años
Dylan Baker
952f849aa3
Implement car and cdr
hace 6 años
Dylan Baker
27c55464f2
Add tests for the core
hace 6 años
Dylan Baker
1e1f64a141
Implement quoted values
hace 6 años
Dylan Baker
8e9d5cfb1d
Raise error for unterminated string literal
hace 6 años
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.
hace 6 años
Dylan Baker
85e7554fcd
Add some rudimentary type checking
hace 6 años
Dylan Baker
2242484bd6
Don't leave variables bound after function execution :(
hace 6 años
Dylan Baker
dfc72ec77b
Run prettier
hace 6 años
Dylan Baker
1954d89211
Allow recursive functions & closures
hace 6 años
Dylan Baker
1a9bdbfc52
Evaluate conditionals
hace 6 años
Dylan Baker
89b4f49dcb
Rename constant spec file
hace 6 años
Dylan Baker
b3735912f5
Parse conditionals
hace 6 años
Dylan Baker
3119c4b7d1
Improve errors a little bit
hace 6 años
Dylan Baker
1cd0480079
Return error for unbound variable/function
hace 6 años
Dylan Baker
48b94af6f6
Store function name on the function node
hace 6 años
Dylan Baker
0b46e6cb5a
Evaluate identifier referents
hace 6 años
Dylan Baker
616231a55b
Evaluate user-defined functions
hace 6 años
Dylan Baker
71b2364613
Parse function definitions
hace 6 años
Dylan Baker
87944658b8
Clean up AST tests
hace 6 años
Dylan Baker
03bc1d2184
Implement booleans
hace 6 años
Dylan Baker
7dae1bac04
Test nested expressions
hace 6 años
Dylan Baker
dea415bdba
Evaluate addition
hace 6 años
Dylan Baker
2910625b1a
Number and string accept an environment as well
hace 6 años
Dylan Baker
39d2e2b2a9
Env tests
hace 6 años
Dylan Baker
df383987bf
Use env in interpreter
hace 6 años
Dylan Baker
fa2699e483
Evaluate definition/indentifier
hace 6 años
Dylan Baker
e3ab53a63e
Parse definition
hace 6 años
Dylan Baker
f31ce80c4b
Evaluate strings
hace 6 años
Dylan Baker
5a23b3dee7
Parse strings
hace 6 años
Dylan Baker
64cc88f9a8
Lex strings
hace 6 años
Dylan Baker
7c02e3cfe9
Evaluate numbers
hace 6 años
Dylan Baker
2dfba579de
Parse application
hace 6 años
Dylan Baker
7b554d0095
Parse identifiers
hace 6 años
Dylan Baker
3d230605bf
Parse numbers
hace 6 años
Dylan Baker
f2495f89f7
Lex identifiers
hace 6 años
Dylan Baker
99b51b4193
Ignore whitespace
hace 6 años
Dylan Baker
84f9e00090
Lex numbers
hace 6 años
Dylan Baker
79c398f4b9
End in EOF
hace 6 años
Dylan Baker
f421c3c196
Scan parens
hace 6 años
Dylan Baker
d3bfd344aa
Initial commit
hace 6 años