Commit Graph

237 Commits

Author SHA1 Message Date
Scott Richmond
cf7e739a93 delete cruft 2022-04-25 20:37:08 -04:00
Scott Richmond
19a0e7e3d5 Factor show out to its own package. 2022-04-25 20:21:23 -04:00
Scott Richmond
6f16495aab Improve ns access error message 2022-04-25 19:23:32 -04:00
Scott Richmond
6d81175b37 Wrap interpret in try/catch for more graceful panics 2022-04-25 19:08:05 -04:00
Scott Richmond
f7809d5ddf Improve panic message reporting 2022-04-25 19:07:18 -04:00
Scott Richmond
9cd4fccfb9 Remove comment cruft 2022-04-25 19:06:30 -04:00
Scott Richmond
8a36b1e4e2 Comment out testing 2022-04-25 18:46:12 -04:00
Scott Richmond
0c77de908c Make context volatile!, not atom 2022-04-25 18:44:44 -04:00
Scott Richmond
ceb8a2aa63 Make test for keyword more robust 2022-04-11 13:08:40 -04:00
Scott Richmond
2f6e81edb1 Add a quick TODO; interpret-import in progress 2022-04-08 20:48:09 -04:00
Scott Richmond
3749d2ea50 Very first draft of import expression 2022-04-08 19:13:57 -04:00
Scott Richmond
fd832ac38e Allow _ as else in cond 2022-04-08 18:26:36 -04:00
Scott Richmond
969bbc548f Parse import statements 2022-04-08 15:59:47 -04:00
Scott Richmond
9dc9e95e85 Parse ignored words as placeholder 2022-04-08 15:23:08 -04:00
Scott Richmond
be2d291fd3 Interpret ns 2022-04-07 18:51:48 -04:00
Scott Richmond
9eecce77bc Fix ns name bug 2022-04-07 18:47:05 -04:00
Scott Richmond
df59b84321 Comment out testing 2022-04-07 18:31:36 -04:00
Scott Richmond
1317e52bbf Parse ns 2022-04-07 18:31:13 -04:00
Scott Richmond
ac83d3070b Update keyword impls 2022-04-07 18:09:53 -04:00
Scott Richmond
917e4f7ab5 Interpret cond; allow else in cond & match 2022-04-06 19:41:36 -04:00
Scott Richmond
03713c67bc Parse cond 2022-04-06 19:21:49 -04:00
Scott Richmond
e6419f6b6a Comment out testing 2022-04-05 20:31:46 -04:00
Scott Richmond
d8e8a1b17e Interpret partially applied functions 2022-04-05 20:27:22 -04:00
Scott Richmond
7309622a2b :partially-applied -> :partial 2022-04-05 20:27:04 -04:00
Scott Richmond
0544a44758 Actually comment out testing 2022-04-05 19:47:38 -04:00
Scott Richmond
bee8c250d4 Parse partial-application placeholder 2022-04-05 19:46:44 -04:00
Scott Richmond
fa5e51a179 Change some testing stuff 2022-04-05 19:11:44 -04:00
Scott Richmond
5a95f58ec1 Interpret do expressions 2022-04-05 19:09:38 -04:00
Scott Richmond
0a34e22a98 Remove debug pps 2022-04-05 19:09:22 -04:00
Scott Richmond
89f813c2f3 Parse do expressions/pipelines 2022-04-05 15:54:28 -04:00
Scott Richmond
174eb2d6a5 Pipeline is now >; add helpful impl comments 2022-04-05 15:54:12 -04:00
Scott Richmond
8cd905b8eb Test around panics. 2022-04-04 19:08:19 -04:00
Scott Richmond
d663f48b6f Remove panic! keyword (it's an fn) 2022-04-04 19:07:33 -04:00
Scott Richmond
bf8e1d1924 Fix prelude/print bug 2022-04-03 22:23:12 -04:00
Scott Richmond
aa3692a141 Get rid of core shadow warnings. 2022-04-03 22:20:31 -04:00
Scott Richmond
e0161372e3 Wire up CLI. 2022-04-03 20:48:22 -04:00
Scott Richmond
12487b390e Remove testing cruft 2022-04-03 20:11:23 -04:00
Scott Richmond
69118ed4e0 Use ex-info everywhere 2022-04-03 20:08:28 -04:00
Scott Richmond
b8e7777841 Called KW enforce one arg 2022-04-03 19:13:54 -04:00
Scott Richmond
f93eacf5f5 Fix keyword function calling 2022-04-03 17:03:22 -04:00
Scott Richmond
7a4034d920 Keywords can be called as passed fns 2022-04-03 15:39:41 -04:00
Scott Richmond
9fd69b57f3 Don't throw in test code 2022-04-03 14:49:20 -04:00
Scott Richmond
31d407c181 Interpret structs 2022-04-03 14:48:23 -04:00
Scott Richmond
7c4751dda8 Actually scan structs. 2022-04-03 14:48:08 -04:00
Scott Richmond
21af8acf2e Parse structs 2022-04-03 14:34:30 -04:00
Scott Richmond
6b9fc590a6 Add struct to parse-expr 2022-04-03 14:25:14 -04:00
Scott Richmond
33a086b312 Copy-paste struct parse from hashmap 2022-04-03 14:24:28 -04:00
Scott Richmond
811a57be1c Add struct to scanner; new reserved words. 2022-04-03 14:22:01 -04:00
Scott Richmond
98530b0f0f Add a static analysis note 2022-03-20 20:15:51 -04:00
Scott Richmond
41e9b4d9dd Some light speed testing: Ludus is 1000x slower than Clojure. 2022-03-20 20:15:43 -04:00
Scott Richmond
52f357765d Light cleanup 2022-03-20 19:39:01 -04:00
Scott Richmond
b7d49cbf5d Test recursion. It works! 2022-03-20 19:35:41 -04:00
Scott Richmond
272951a411 Add several functions to the prelude 2022-03-20 19:35:29 -04:00
Scott Richmond
3f8207fa41 Add ns for ludus data 2022-03-20 19:35:16 -04:00
Scott Richmond
9ce1f29977 Update notes 2022-03-20 19:25:20 -04:00
Scott Richmond
b5a5be9dd0 Change tuple representation 2022-03-20 19:21:55 -04:00
Scott Richmond
d02bc05209 Finally: add functions! 2022-03-20 19:17:15 -04:00
Scott Richmond
3b1f2460a8 Write basic test case 2022-03-20 18:32:31 -04:00
Scott Richmond
1f19a0ea1e Decide against refactoring beyond cljfmt, write basic fn parser 2022-03-20 18:30:30 -04:00
Scott Richmond
bfef7a8e66 cljfmt all the things 2022-03-20 17:58:38 -04:00
Scott Richmond
5da8090d2b Reindent things; start work on named fns; decide to refactor things 2022-03-20 17:37:44 -04:00
Scott Richmond
0f64307ba8 Add happy path for anon simple fns 2022-03-20 17:01:21 -04:00
Scott Richmond
3fde297e07 Import prelude 2022-03-20 16:41:02 -04:00
Scott Richmond
14b6e31081 Move prelude functions out to prelude ns 2022-03-20 16:40:50 -04:00
Scott Richmond
1d9559402c Add panic 2022-03-20 16:33:59 -04:00
Scott Richmond
0f2e30a8de Update more notes 2022-03-20 16:15:27 -04:00
Scott Richmond
d924b5fa6f Update notes 2022-03-20 16:15:07 -04:00
Scott Richmond
85f7bc8c08 Add hashmaps, synthetics, native functions 2022-03-20 15:46:49 -04:00
Scott Richmond
11a51cf708 Interpret match expressions 2022-03-20 14:14:15 -04:00
Scott Richmond
069e3b4a7b Parse multi-clause match expressions 2022-03-20 13:28:05 -04:00
Scott Richmond
e4e984bacd Parse single-clause match expressions 2022-03-19 20:52:13 -04:00
Scott Richmond
584ddaf705 Skip comments, the dumb solution. 2022-03-19 19:21:29 -04:00
Scott Richmond
2a099298f0 Reindent things 2022-03-19 19:09:21 -04:00
Scott Richmond
90f6fa8b19 Few extra points 2022-03-19 19:08:55 -04:00
Scott Richmond
270f6100b7 Add a stub of a static analyzer. 2022-03-19 19:08:12 -04:00
Scott Richmond
7a2fabd131 Clean up notes to reflect current state of affairs 2022-03-19 19:07:46 -04:00
Scott Richmond
35d398c2e0 Add hashmap parsing. It's basic. 2022-03-19 19:01:32 -04:00
Scott Richmond
8368d6362d Add tuple patterns & matching 2022-03-19 18:23:15 -04:00
Scott Richmond
a4c5927ec4 Notes to selves 2022-03-19 17:30:41 -04:00
Scott Richmond
3f0feab83b Start work on the interpreter 2022-03-19 17:28:48 -04:00
Scott Richmond
5baa4fe3ba Expose parse function 2022-03-19 17:28:30 -04:00
Scott Richmond
fc035eb1ba Simplify forward declarations 2022-03-19 17:28:18 -04:00
Scott Richmond
e890c44fbd Improve and expose parse-script 2022-03-19 17:26:51 -04:00
Scott Richmond
4c186bae3a Better syncing in collection literals 2022-03-19 17:26:13 -04:00
Scott Richmond
faba605329 if* -> if, let* -> let 2022-03-19 12:30:59 -04:00
Scott Richmond
85d4f99030 Delete old/broken versions of let & if 2022-03-19 12:30:05 -04:00
Scott Richmond
3d080403dc Reindent--clean up 2022-03-19 12:29:15 -04:00
Scott Richmond
aa7f2ac8fc Get if-exprs fully wired up 2022-03-19 12:28:13 -04:00
Scott Richmond
e616dcd453 Fix bug with empty blocks 2022-03-19 12:27:47 -04:00
Scott Richmond
37b9560ee3 Fix typo 2022-03-19 12:27:30 -04:00
Scott Richmond
83392e3ac4 Start work on if errors 2022-03-13 19:43:57 -04:00
Scott Richmond
a05feea32a Notes on getting to a working if 2022-03-12 14:42:16 -05:00
Scott Richmond
21bef073d0 Fully fix lets; re-discover unfinished business with ifs 2022-03-12 14:39:27 -05:00
Scott Richmond
1a1f720358 Fix infinite hang bug with panics 2022-03-12 13:30:33 -05:00
Scott Richmond
0e4673a1a1 Make some progress notes 2022-02-21 22:30:27 -05:00
Scott Richmond
f96ec45d1b Improve parse-script; start work on let and pattern 2022-02-21 15:38:47 -05:00
Scott Richmond
8ec432c7a0 Tidy up expr-sync 2022-02-21 15:03:32 -05:00
Scott Richmond
33fad7656c Improve parse-block 2022-02-21 14:57:23 -05:00
Scott Richmond
3357248b3c Add do and import reserved words 2022-02-21 14:54:14 -05:00
Scott Richmond
4edfbcb04d Improve parse-set; do not swallow errors on unterminated collections 2022-02-21 14:03:58 -05:00
Scott Richmond
d23a561eda Improve parse-list (based on parse-tuple) 2022-02-21 13:56:46 -05:00
Scott Richmond
61b25ca22d Clean up parse-tuple 2022-02-21 13:46:41 -05:00
Scott Richmond
e6b204a54a Better error handling, in script & tuple 2022-02-21 13:43:30 -05:00
Scott Richmond
9414109312 Finally get error handling right? 2022-02-21 13:16:22 -05:00
Scott Richmond
a4cecc3d01 Make some progress on good parser errors 2022-02-20 19:33:24 -05:00
Scott Richmond
3fde2cb52b Atoms keep tokens. Add panic mode, begin better errors. 2022-02-20 18:40:16 -05:00
Scott Richmond
2751b7428f Whitespace should not return errors 2022-02-20 18:39:18 -05:00
Scott Richmond
23e2e95e77 Better errors? WIP 2022-02-19 14:34:07 -05:00
Scott Richmond
40367d7e57 Update number lexing comments 2022-02-19 14:20:09 -05:00
Scott Richmond
5d78d5f823 Tonksy-fmt 2022-02-18 17:49:02 -05:00
Scott Richmond
d6a547bdcb Odds & ends 2022-02-18 17:25:36 -05:00
Scott Richmond
a71db0e640 Delete prints; next -> peek; remove loop in parse-expr 2022-02-15 22:48:36 -05:00
Scott Richmond
96b30ece05 if exprs; add expect, accept, accept-many helpers 2022-02-15 19:45:39 -05:00
Scott Richmond
a35da1498e Remove expect fns; declare parse-word. 2022-02-15 18:27:22 -05:00
Scott Richmond
531c85054c Stub of let works. 2022-02-15 13:24:09 -05:00
Scott Richmond
6b61a10349 Stub of let 2022-02-15 13:17:01 -05:00
Scott Richmond
84663d0952 Add = (as replacement for <- now that we have let) 2022-02-15 13:16:46 -05:00
Scott Richmond
25da37d093 Start, but do not finish, work on let expressions 2022-02-14 20:09:10 -05:00
Scott Richmond
3fa280402c Enforce non-empty blocks 2022-02-14 18:29:29 -05:00
Scott Richmond
dd47244b78 Fix bug in script & block 2022-02-14 18:13:56 -05:00
Scott Richmond
05f55e6a84 Working synthetic parsing; simplify 2022-02-14 18:05:29 -05:00
Scott Richmond
98b147f5b8 Factor out keyword parsing, parse bare words 2022-02-14 17:32:29 -05:00
Scott Richmond
40db886843 Keep working on parser, take notes, stuff & stuff 2022-02-14 16:47:08 -05:00
Scott Richmond
e2f8b0cb6c Individuate reserved words in tokens 2022-02-14 16:46:42 -05:00
Scott Richmond
3806683c99 Start work on parsing. (Really?!) 2022-02-08 19:43:08 -05:00
Scott Richmond
32390a4847 Delete repl cruft 2022-02-08 19:42:51 -05:00
Scott Richmond
d56ea970b6 Remove unused from-keyword function 2022-02-08 19:42:31 -05:00
Scott Richmond
c3426624c9 A mostly-complete scanner! 2022-02-06 18:20:55 -05:00
Scott Richmond
bbe20d4af1 Putter around in scanner 2022-02-06 12:36:03 -05:00
Scott Richmond
2eb7960cc9 Start work on words, add double-colon, fix terminators 2022-02-05 19:24:39 -05:00
Scott Richmond
eb5f5233b6 Scan strings 2022-01-22 18:07:04 -05:00
Scott Richmond
1c60dce605 Add backslash 2022-01-15 14:40:46 -05:00
Scott Richmond
d8273946f5 Update reserved words 2022-01-08 17:36:48 -05:00
Scott Richmond
1ca1e4df25 Fix a bunch of things, hack some 2022-01-08 17:19:56 -05:00
Scott Richmond
6b00dfe1f5 Fiddle with the scanner. 2021-12-28 18:24:42 -05:00
Scott Richmond
425c021fa1 leinify 2021-10-30 14:51:35 -04:00
Scott Richmond
d6052bf2b8 cljs project setup 2021-10-21 12:54:57 -04:00