diff --git a/anselme/ast/Branched.lua b/anselme/ast/Branched.lua index 9bb66b5..6f868b2 100644 --- a/anselme/ast/Branched.lua +++ b/anselme/ast/Branched.lua @@ -7,7 +7,7 @@ local ast = require("anselme.ast") local Branched Branched = ast.abstract.Runtime { type = "branched", - mutable = true, + mutable = true, -- 🥳 value = nil, -- { [branch name] = value, ... } diff --git a/anselme/parser/expression/secondary/infix/call.lua b/anselme/parser/expression/secondary/infix/call.lua index 2f4b8f5..8601a1c 100644 --- a/anselme/parser/expression/secondary/infix/call.lua +++ b/anselme/parser/expression/secondary/infix/call.lua @@ -14,7 +14,7 @@ return infix { match = function(self, str, current_priority, primary) local escaped = escape(self.operator) - -- TODO: doesn't support newline between ! and identifier, event in multiline expression + -- TODO: doesn't support newline between ! and identifier, even in multiline expression return self.priority > current_priority and str:match("^"..escaped) and identifier:match(str:match("^"..escaped.."[ \t]*(.-)$")) end, diff --git a/anselme/state/event_manager.lua b/anselme/state/event_manager.lua index 394eb72..ffe36f4 100644 --- a/anselme/state/event_manager.lua +++ b/anselme/state/event_manager.lua @@ -39,7 +39,7 @@ return class { state.scope:set(discard_next_events_identifier, Nil:new()) -- fake flush the discarded events end end - -- flush until no event or same type + -- flush until no event of same type repeat local current_type = state.scope:get(last_event_type_identifier):to_lua(state) if current_type ~= nil and current_type ~= event.type then diff --git a/ideas.md b/ideas.md index e092e2d..b62abe7 100644 --- a/ideas.md +++ b/ideas.md @@ -16,15 +16,6 @@ Standard library. - retag/add tags * And in general, clean up everything. ---- - -Default arguments and initial variables values should pass the value check associated with the variable / parameter. -Issue: dispatch is decided before evaluating default values. - ---- - -Comment syntax, not sure about using -- for inline and /* for multiline. - # Can be done later Translation. @@ -47,17 +38,14 @@ Return system. Could be reused for exception handling or other purposes if accessible by the user. +Also, named break for nested loops. + --- Custom function for building text/string interpolation. --- -Reduce the number of AST node types ; try to merge similar node and make simpler individuals nodes if possible by composing them. -Won't help with performance but make me feel better, and easier to extend. Anselme should be more minimal is possible. - ---- - Static analysis tools. To draw a graph of branches, keep track of used variables and prune the unused ones from the Environments, pre-filter Overloads, etc. @@ -79,14 +67,7 @@ Then again, performance has never been a goal of Anselme. --- -Macros. - -Could be implemented by creating functions to build AST nodes from Anselme that can also take quotes as arguments. -That should be easy, but I don't remember why I wanted macros in the first place, so until I want them again, shrug. - ---- - -High concept ideas / stuff that sounds cool but maybe not worth it. +High concept ideas / stuff that sounds cool but likely not worth it. * Instead of using a bunch of sigils as operators, accept fancy unicode caracters. Easy to parse, but harder to write.