aboutsummaryrefslogtreecommitdiffstats
path: root/csc
AgeCommit message (Collapse)AuthorFilesLines
2022-04-02Write a test for case-lambda.Rose Hogenson3-18/+49
I'm realizing that I should have started with builtin-exit and implemented the hard stuff later.
2022-03-31Improvements in macros and IR1.Rose Hogenson4-184/+171
We're omitting libraries for now, and I'll add them in later.
2022-03-31Allow overriding the cmp function in assert-equal.Rose Hogenson2-93/+6
2022-03-03Write the compiler frontend.Rose Hogenson4-54/+186
2022-01-25Nitpick on loop style.Rose Hogenson1-3/+4
2022-01-25Use an exception for loop return.Rose Hogenson1-18/+12
This makes everything a lot easier, as it handles nested loops automatically. My brain wave was storing the returned values in a thunk.
2022-01-25Fix the bugs in loop.Rose Hogenson2-44/+230
It works! Sometimes it emits nested loops!
2022-01-24Implement lambda?Rose Hogenson2-12/+209
2022-01-24Finish the loop macro.Rose Hogenson3-164/+362
I also cleaned everything up a lot. Maybe there are still bugs because the test coverage is awful, but for now I'm happy to be done.
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