Commit Graph

130 Commits

Author SHA1 Message Date
Scott Richmond
1e295cb483 guards work in match forms 2025-06-04 18:55:40 -04:00
Scott Richmond
e32f4a0226 guards work in match forms 2025-06-04 18:51:07 -04:00
Scott Richmond
5660d62aff let as last expr in block now returns rhs; clean up some comment cruft 2025-06-04 18:27:17 -04:00
Scott Richmond
8909f7350b closures work?! 2025-06-04 17:53:38 -04:00
Scott Richmond
911702f4bf add a print builtin/opcode 2025-06-03 19:26:01 -04:00
Scott Richmond
3f48d2e49f implement multiterm synthetic expressions 2025-06-03 19:13:40 -04:00
Scott Richmond
aaa9ab2e98 start pulling base fns into bytecode interpreter 2025-06-03 18:54:33 -04:00
Scott Richmond
6e6fc1030b function calls: first draft, worked out the obvious bugs 2025-06-03 17:30:00 -04:00
Scott Richmond
1b462ce8ce keywords and interned strings use &'static str instead of indexes into vecs 2025-06-03 16:23:37 -04:00
Scott Richmond
85338bcbf9 basic function calls, still with bugs! 2025-06-03 15:48:13 -04:00
Scott Richmond
5075e118c0 vm.chunk -> vm.callframe.chunk 2025-06-02 13:34:23 -04:00
Scott Richmond
d85fce26da maybe properly compile functions? need to start work on fn calls to test 2025-06-01 20:01:42 -04:00
Scott Richmond
da9a71e85e start major work on function compilation 2025-05-30 17:02:55 -04:00
Scott Richmond
d9eedb7ba0 add as patterns 2025-05-30 14:57:51 -04:00
Scott Richmond
663435e223 add string interpolation 2025-05-30 11:44:32 -04:00
Scott Richmond
e2617de4e9 or and and are now reserved words 2025-05-28 16:37:25 -04:00
Scott Richmond
0d48509c51 add builtins, fix basic synthetic expressions 2025-05-27 14:15:12 -04:00
Scott Richmond
472010c526 first draft loop/recur, seems to work? 2025-05-26 11:03:37 -04:00
Scott Richmond
efefa77b6e return register now an 8-member array 2025-05-26 09:16:47 -04:00
Scott Richmond
bccafbd4ab update repeat 2025-05-26 08:32:33 -04:00
Scott Richmond
943eaf22fe dict patterns prolly work? one-level nested patterns work 2025-05-25 19:14:34 -04:00
Scott Richmond
7725e5546c rough, not yet working, draft of dict patterns 2025-05-25 19:09:21 -04:00
Scott Richmond
9d1ccb1c00 add list patterns, fix dict stack mechanics 2025-05-25 16:30:20 -04:00
Scott Richmond
47b553a300 properly compile when expressions? 2025-05-23 17:59:09 -04:00
Scott Richmond
9921d02945 compiler: decouple stack & bindings resetting 2025-05-23 13:43:35 -04:00
Scott Richmond
db4c537db6 compiler: decouple stack & bindings resetting 2025-05-23 13:42:29 -04:00
Scott Richmond
55361dd7c1 oh god, so many changes. working on tuple matching 2025-05-23 00:09:35 -04:00
Scott Richmond
2b39b1b54b take some loop notes 2024-12-27 00:54:31 -05:00
Scott Richmond
6cbe253f6e vm::run is now a loop, not vm::interpret as a tailcall 2024-12-27 00:47:22 -05:00
Scott Richmond
420415f984 add match_depth to vm 2024-12-27 00:22:01 -05:00
Scott Richmond
ce77b25ac7 refactor if/else to match in guard compilation 2024-12-26 23:48:38 -05:00
Scott Richmond
9ae2e8eca2 compile guards in match forms 2024-12-26 23:46:06 -05:00
Scott Richmond
0719e4a276 fix block compilation; compile & run repeat 2024-12-26 23:33:57 -05:00
Scott Richmond
774df695d9 separate compiler & chunk 2024-12-26 19:03:09 -05:00
Scott Richmond
e37b562c93 notes and comments 2024-12-26 18:41:54 -05:00
Scott Richmond
05abe64e45 working & thinking 2024-12-24 12:35:44 -05:00
Scott Richmond
d3df1e8ed2 continue work on compiling functions 2024-12-23 10:55:28 -05:00
Scott Richmond
5618cf9ef8 get lifetime out of Chunk, thus out of Value 2024-12-22 19:51:02 -05:00
Scott Richmond
e8a90c5356 get simple match forms done 2024-12-22 19:33:59 -05:00
Scott Richmond
068a8aa724 do lots of work 2024-12-22 19:07:42 -05:00
Scott Richmond
27443444e3 get binding & pretty debugging working 2024-12-18 01:28:23 -05:00
Scott Richmond
044c7264f8 do work 2024-12-17 23:45:39 -05:00
Scott Richmond
e61d07efa6 add untracked from opening bytecode branch 2024-12-15 23:50:12 -05:00
Scott Richmond
bbe38e6bf6 DRY out validator, simplify code 2024-12-15 23:49:43 -05:00
Scott Richmond
e13c5a5ba3 finish list of valid types 2024-12-15 23:49:27 -05:00
Scott Richmond
d0afa3a547 make some progress: atoms and ifs 2024-12-15 23:28:57 -05:00
Scott Richmond
2aa9892d25 some simple bytecodes! 2024-12-15 17:54:40 -05:00
Scott Richmond
3cddbac42c start working on a bytecode interpreter! 2024-12-15 16:37:51 -05:00
Scott Richmond
6388aae0fa things & stuff 2024-12-14 13:43:08 -05:00
Scott Richmond
70ecebcbe9 fix print! 2024-12-13 13:47:03 -05:00