-
Notifications
You must be signed in to change notification settings - Fork 3
Support RegExp extended mode and comments #1013
Copy link
Copy link
Open
Labels
engineTGocciaEngine: language semantics, ECMAScript built-ins, parser, interpreter, bytecode VMTGocciaEngine: language semantics, ECMAScript built-ins, parser, interpreter, bytecode VMnew featureNew feature or requestNew feature or requestspec complianceMismatch against official JavaScript/TypeScript specificationMismatch against official JavaScript/TypeScript specification
Milestone
Description
Metadata
Metadata
Assignees
Labels
engineTGocciaEngine: language semantics, ECMAScript built-ins, parser, interpreter, bytecode VMTGocciaEngine: language semantics, ECMAScript built-ins, parser, interpreter, bytecode VMnew featureNew feature or requestNew feature or requestspec complianceMismatch against official JavaScript/TypeScript specificationMismatch against official JavaScript/TypeScript specification
Summary
Implement the Stage 1 TC39 proposal: https://github.com/tc39/proposal-regexp-x-mode
Implement the current proposal's extended-mode grammar, comments, scoped changes, and character-class/escape boundaries.
Why
This proposal fits GocciaScript's modern ECMAScript surface and the 0.13.0 proposal roadmap. It should extend the engine's existing architecture rather than arrive as a userland shim.
Current behavior
Standard flags and scoped modifier groups exist, but extended whitespace/comment mode does not.
Expected behavior
Implement the current proposal's extended-mode grammar, comments, scoped changes, and character-class/escape boundaries.
Scope notes
Integrate in the RegExp compiler lexical layer so source offsets, diagnostics, Unicode sets, captures, and backreferences remain correct. Follow upstream spelling exactly; add literal/constructor tests and performance checks. Additive RegExp syntax: no engine flag.
Related bytecode roadmap: #871 and #875. Update the relevant language/built-in documentation and Goccia proposal inventory. Use the proposal repository and its current specification at implementation time; add focused project tests and matching pinned Test262/proposal coverage without regressions.
Acceptance criteria