mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 20:32:10 +00:00
- resolves https://github.com/oxc-project/oxc/issues/5977 - supersedes https://github.com/oxc-project/oxc/pull/5951 To facilitate easier traversal of the Regex AST, this PR defines a `Visit` trait with default implementations that will walk the entirety of the Regex AST. Methods in the `Visit` trait can be overridden with custom implementations to do things like analyzing only certain nodes in a regular expression, which will be useful for regex-related `oxc_linter` rules. In the future, we should consider automatically generating this code as it is very repetitive, but for now a handwritten visitor is sufficient. |
||
|---|---|---|
| .. | ||
| examples | ||
| src | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| README.md | ||
oxc_regular_expression
Implements ECMAScript® 2024 Language Specification
- https://tc39.es/ecma262/2024/multipage/ecmascript-language-lexical-grammar.html#sec-literals-regular-expression-literals
- https://tc39.es/ecma262/2024/multipage/text-processing.html#sec-regexp-regular-expression-objects
- https://tc39.es/ecma262/2024/multipage/additional-ecmascript-features-for-web-browsers.html#sec-regular-expressions-patterns