From 7a2fabd13101e5225e74b01fae777d5b7cd4a69f Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Sat, 19 Mar 2022 19:07:46 -0400 Subject: [PATCH] Clean up notes to reflect current state of affairs --- src/ludus/parser.clj | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/src/ludus/parser.clj b/src/ludus/parser.clj index 8375cf2..f8d7857 100644 --- a/src/ludus/parser.clj +++ b/src/ludus/parser.clj @@ -524,35 +524,19 @@ (comment " Further thoughts/still to do: - * Clean up the parsing functions: - - use accept-many in blocks and scripts - - ast nodes should include their tokens (this is added for atoms, which may be fully sufficient) - * Time to start working on parsing errors (poisoned nodes, panic mode, etc.) - - this now works on atoms, collections, synthetics, blocks, and scripts - - add to everything else: - - CURRENTLY: - * figure out how to parse `if` with similar strategy to `let` - * one possibility is to paramterize parse-expr with a sync token: - the idea here is that exprs will have different end sync points in different contexts (`}` vs `then` vs `\n`, etc.) - * the strategy here will be the same for the rest of the sequential constructs: `let`, `if`, `import`, `fn`, `loop`, etc. + * AST nodes should include tokens/locations + - at current, only atoms do this + * Improve error handling in hashmap parsing + * Other quick thoughts: - * Once I get this far, then it's time to wire up the interpreter (with hard-coded functions, and the beginning of static analysis) * Placeholders - * Placeholders may only appear in tuples in synthetic expressions - * Each of these may have zero or one placeholders + * Does this want to happen in parsing or in analysis? For future correctness checks: - * Early (even as part of wiring up the interpreter), begin the static analysis check for - - unbound names - - re-binding of names - * Compound `loop` and `gen` forms must have LHS's (tuple patterns) of the same length - * Recur must be in tail position in `loop`s - * Tail call optimization for simple recursion - * Check arities for statically known functions - * Enforce single-member tuple after called keywords + ")