v1.0.0 #21
minirang
announced in
Announcements
v1.0.0
#21
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
Implemented a full tree-walking interpreter (
engine/interpreter/): Value/Environmentmodel, Python-style function-level scoping with explicit
change x to globalbridging,1-based indexing/slicing with negative-index support, collections (
add/remove/replace/indexed
change, insertion-ordered maps), functions (returnable/asyncin anycombination),
or_elseerror recovery, anduse/from/DLC:*module loading.Implemented CuffScript's custom pattern-matching engine from scratch (
engine/regex/):a dedicated compiler + backtracking matcher for the full
docs/REGEX.mddialect(character classes, presets,
[one:...], named/numbered captures, quantifiers includingN~Mranges and lazy variants, anchors, flags), wired intois/IS,match ... from,find ... from,replace ... in ... to,split ... by, andcount ... in— including astep-count + time-limit safety guard against catastrophic backtracking.
Introduced a systematic, extensible error hierarchy (
engine/common/ErrorCodes.h,engine/common/CuffError.h): every error carries a stable numeric code, category,location, message, and optional hint, and is marked recoverable/non-recoverable so
or_elsecatches exactly the right things../cuffc program.cuffnow runs the program by default;--astreproduces the previoustokens/AST-dump behavior for engine development.
Fixed several defects that prevented the previously-committed engine from compiling or
running at all (broken relative includes, a use-before-complete-type cycle between the
statement/expression sub-parsers, a real dangling-copy bug in
awaitparsing, a missing-Wunused-variable), added single-quoted string literals (needed for map/match key accessinside f-strings per
docs/REGEX.md), fixed f-string{{/}}escaping and nested-bracehandling, and corrected
!to bind looser than comparison (!lvl is MAX_LEVELnow means!(lvl is MAX_LEVEL), matching the spec's own examples).Added
docs/IMPLEMENTATION_NOTES.mddocumenting every place the language spec leavesruntime behavior unspecified and the choice this engine makes there (async model, DLC
function list, module-merge semantics, etc.), and
docs/EXTENDING.mdas a guide foradding new builtins/DLC libraries/statements/expressions.
This discussion was created from the release v1.0.0.
All reactions