Dylan Baker
21bf43c0e0
Don't allow binding to an unbound variable
il y a 6 ans
Dylan Baker
0a4d8d334d
Implement lambdas
il y a 6 ans
Dylan Baker
58c66d8435
Implement map
il y a 6 ans
Dylan Baker
c5189a5c87
Implement cons
il y a 6 ans
Dylan Baker
952f849aa3
Implement car and cdr
il y a 6 ans
Dylan Baker
e11382f5be
Allow type errors for lists
il y a 6 ans
Dylan Baker
691a5722aa
Display identifiers and lists at the repl
il y a 6 ans
Dylan Baker
9a3f2a6340
Fix quotation evaluation
il y a 6 ans
Dylan Baker
987328470b
Evaluate lists that are not applications
il y a 6 ans
Dylan Baker
27c55464f2
Add tests for the core
il y a 6 ans
Dylan Baker
e2f0da5eda
Implement
il y a 6 ans
Dylan Baker
6afbc18558
Update readme
il y a 6 ans
Dylan Baker
e0b17775a5
Fix repl handling of ctrl-c
il y a 6 ans
Dylan Baker
39369d9375
Display quoted values in repl
il y a 6 ans
Dylan Baker
1e1f64a141
Implement quoted values
il y a 6 ans
Dylan Baker
8e9d5cfb1d
Raise error for unterminated string literal
il y a 6 ans
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.
il y a 6 ans
Dylan Baker
85e7554fcd
Add some rudimentary type checking
il y a 6 ans
Dylan Baker
b3ce44f30a
Tweak object displays in REPL
il y a 6 ans
Dylan Baker
83ed61e4d5
Move the REPL into its own class
il y a 6 ans
Dylan Baker
2242484bd6
Don't leave variables bound after function execution :(
il y a 6 ans
Dylan Baker
dfc72ec77b
Run prettier
il y a 6 ans
Dylan Baker
1954d89211
Allow recursive functions & closures
il y a 6 ans
Dylan Baker
1a9bdbfc52
Evaluate conditionals
il y a 6 ans
Dylan Baker
89b4f49dcb
Rename constant spec file
il y a 6 ans
Dylan Baker
b3735912f5
Parse conditionals
il y a 6 ans
Dylan Baker
8f652e87fb
Add comparison functions
il y a 6 ans
Dylan Baker
3119c4b7d1
Improve errors a little bit
il y a 6 ans
Dylan Baker
2924a9b9dc
Sometimes we have an AST node and sometimes we have a raw value
il y a 6 ans
Dylan Baker
cc51634636
Handle ctrl+c in repl, add exit function
il y a 6 ans
Dylan Baker
1cd0480079
Return error for unbound variable/function
il y a 6 ans
Dylan Baker
48b94af6f6
Store function name on the function node
il y a 6 ans
Dylan Baker
0b46e6cb5a
Evaluate identifier referents
il y a 6 ans
Dylan Baker
f34112d2c8
Clean up REPL
il y a 6 ans
Dylan Baker
616231a55b
Evaluate user-defined functions
il y a 6 ans
Dylan Baker
71b2364613
Parse function definitions
il y a 6 ans
Dylan Baker
87944658b8
Clean up AST tests
il y a 6 ans
Dylan Baker
03bc1d2184
Implement booleans
il y a 6 ans
Dylan Baker
7dae1bac04
Test nested expressions
il y a 6 ans
Dylan Baker
bd283f0913
Fix lexer whitespace issues
il y a 6 ans
Dylan Baker
8daaeacad7
Get REPL working
il y a 6 ans
Dylan Baker
dea415bdba
Evaluate addition
il y a 6 ans
Dylan Baker
2910625b1a
Number and string accept an environment as well
il y a 6 ans
Dylan Baker
39d2e2b2a9
Env tests
il y a 6 ans
Dylan Baker
88fd2818b9
Create core
il y a 6 ans
Dylan Baker
df383987bf
Use env in interpreter
il y a 6 ans
Dylan Baker
fa2699e483
Evaluate definition/indentifier
il y a 6 ans
Dylan Baker
e3ab53a63e
Parse definition
il y a 6 ans
Dylan Baker
7d4ebdb9eb
Create Env class
il y a 6 ans
Dylan Baker
f31ce80c4b
Evaluate strings
il y a 6 ans