aboutsummaryrefslogtreecommitdiffstats
path: root/csc
AgeCommit message (Collapse)AuthorFilesLines
2022-01-22Store the list length in sort.Rose Hogenson1-8/+12
Computing length each time is very unnecessary.
2022-01-22Add a loop macro.Rose Hogenson3-12/+313
2022-01-15Finish the macro expander.Rose Hogenson6-105/+501
It works!! At least it passes all the test cases. Next I will: 1. finish the builtins, 2. add a conversion to IR2 in continuation passing style, 3. add a compiler from IR2 to bytecode, 4. and add an option to the frontend compiler to generate a standalone executable.
2022-01-14Write a first draft macro expander.Rose Hogenson6-161/+414
Committing it because it compiles. I have to write tests and debug it still.
2022-01-13Rewrite match to use exceptions.Rose Hogenson1-17/+43
This makes the control flow more clear, and eliminates the need to scan the pattern twice. It also makes it easier to add new forms by consolidating the pattern logic in one procedure.
2022-01-13Use := instead of = for variable assignment.Rose Hogenson1-1/+1
I was reading about the difference, and := does what you want more often than not.
2022-01-13Generalize the hash map.Rose Hogenson3-35/+48
Before we were assuming keys could be compared with eqv?. But it seems like that assumption isn't true when we want to hold identifiers in the hash map.
2022-01-11Move scheme compiler into a separate directory.Rose Hogenson27-0/+1749