Dylan Baker
5d73f82733
Compile to HTML
il y a 6 ans
Dylan Baker
a0ac2606ec
Rename head/tail to first/rest
Trying to avoid conflict with the <head> tag
il y a 6 ans
Dylan Baker
fb75ea9bc2
Style
il y a 6 ans
Dylan Baker
7bbcd1de4f
Fix bug where lambda required an application
il y a 6 ans
Dylan Baker
cf57876795
Implement compiler
Just strings and numbers for now
il y a 6 ans
Dylan Baker
7d8caf316f
Prettier
il y a 6 ans
Dylan Baker
f1466bf07a
Add cons, head, and tail; remove type checking
I think there’s a better way to do type checking so I’m going to hold off on it for now and get basic functionality working for now and come back later.
il y a 6 ans
Dylan Baker
da6ce44556
Add length function; preserve Number node line numbers
il y a 6 ans
Dylan Baker
0abc70adbd
Move core functions to their own module
il y a 6 ans
Dylan Baker
acc88c3df9
Create list function
il y a 6 ans
Dylan Baker
65eade66fd
Remove unused import
il y a 6 ans
Dylan Baker
8821f2368e
Make sure all arguments get evaluated
il y a 6 ans
Dylan Baker
e045a21b34
Remove experimental file
il y a 6 ans
Dylan Baker
d66c23ab39
Prettier
il y a 6 ans
Dylan Baker
80c7326df2
Implement missing closing “/) errors
il y a 6 ans
Dylan Baker
bd4aa9d124
Fix error handling and bug where let bindings stay in scope
il y a 6 ans
Dylan Baker
c93190c567
Implement let bindings
il y a 6 ans
Dylan Baker
2f5f91b2fe
Alphabetize methods
il y a 6 ans
Dylan Baker
9ae2911337
Reorganize bin.js a little
il y a 6 ans
Dylan Baker
380e81044f
Remove stray semicolon
il y a 6 ans
Dylan Baker
fc7978ce6b
Evaluate conditionals
il y a 6 ans
Dylan Baker
b9e4a1f908
Move AST nodes into one file
il y a 6 ans
Dylan Baker
9662adf8aa
Implement definitions
il y a 6 ans
Dylan Baker
ca4684994c
Evaluate booleans and strings
il y a 6 ans
Dylan Baker
63d4d4b735
Evaluate lambda functions
il y a 6 ans
Dylan Baker
369853af3e
Replace compiler with evaluator
This class exposes two functions. `evalNode` take an AST node and evaluates it down to simplest terms. `eval` takes an array of AST nodes and calls evalNode on each of them. I don’t think we’re quite ready to be producing HTML yet so let’s not get ahead of ourselves.
il y a 6 ans
Dylan Baker
4d957c60a0
Core functions should return Oslo types, not JS types
il y a 6 ans
Dylan Baker
f4f4f18106
Add comparison functions to core env
il y a 6 ans
Dylan Baker
76c6eac9b5
Implement conditionals
Currently I'm relying on JavaScript's semantics
around truthiness. I think I'm going to retain
that ease of use (i.e. `(if list #t #f)` should
return true if the list has more than 0 elements,
etc) but I want to specify that behavior myself.
il y a 6 ans
Dylan Baker
c833db2f94
LOL I forgot how Lisp works
il y a 6 ans
Dylan Baker
3e5a873054
Prettier :/
il y a 6 ans
Dylan Baker
b83126524d
Make all functions lambdas for now
il y a 6 ans
Dylan Baker
06ab1b52d4
Compile function applications (named and lambda)
il y a 6 ans
Dylan Baker
7a9b1a6727
Create simple compiler class
Just numbers and strings for now
il y a 6 ans
Dylan Baker
0b4d63ee91
Make sure source gets passed in as a string
I noticed that if you passed in just a number, JS
would helpfully parse that and then
`source.length` was undefined, which broke the
lexer.
il y a 6 ans
Dylan Baker
bffecce670
Add lambdas
il y a 6 ans
Dylan Baker
90d84dbb6f
Prettier
il y a 6 ans
Dylan Baker
67ca84857f
Prettier
il y a 6 ans
Dylan Baker
4b3ce29206
Remove resolver and compiler, add define to parser
il y a 6 ans
Dylan Baker
91730231df
Saving state
il y a 6 ans
Dylan Baker
3b6525e29f
Prettier
il y a 6 ans
Dylan Baker
497af0aa34
Implement test helper functions
il y a 6 ans
Dylan Baker
296e94f25a
Add .DS_Store and .oslo files to gitignore
I keep test .oslo files around and I hate not
having a clean repo.
il y a 6 ans
Dylan Baker
681a88a755
Clean up unused stuff
il y a 6 ans
Dylan Baker
a3e6a6df66
Move list of selfclosing tags into its own module
il y a 6 ans
Dylan Baker
60c6d9a24a
Don't include ="" for attributes with empty string
il y a 6 ans
Dylan Baker
20ab139ca7
Add doctype to list of self closing tags
I added upper and lowercase because that seemed
preferable to always casting every html function
name to lowercase.
il y a 6 ans
Dylan Baker
f77ad26a69
Allow empty strings
il y a 6 ans
Dylan Baker
581c99f794
Rewrite AST and compiler to be more normal
il y a 6 ans
Dylan Baker
c7c40f7df7
Implement number and boolean types
il y a 6 ans