mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-23 12:55:26 +00:00
Complete rewrite of module splitter across 3 files (JS, MJS, TS): parseTopLevelStatements(): proper parser tracking brace/paren/bracket depth, skipping strings/regex/comments/template literals. Only splits at depth 0. isStatementBoundaryAfterBrace(): prevents splitting destructuring, import/export, and chained expressions. classifyStatement(): scores COMPLETE statements against module keywords. Statements are NEVER split across modules. isSyntacticallyValid(): validates via new Function() with ESM stripping, async wrapping, and brace-balance fallback. Before: 2/17 modules parse (keyword line-grep, cuts mid-expression) After: 14/14 modules parse (statement-boundary, brace-balanced) Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|---|---|---|
| .. | ||
| module-splitter.mjs | ||
| rvf-builder.mjs | ||