Commit graph

2 commits

Author SHA1 Message Date
Sebastian Herrlinger
1d250bc759 test(codemode): record the conformance cases through the reference's language runtime 2026-11-19 01:53:45 +01:00
kommander
d1cffe8e14 fix(codemode): word RegExp syntax errors as the reference's host does
new RegExp reported regress's errors ('Unbalanced parenthesis'), and
regress accepts a few patterns JavaScriptCore rejects, such as \b* outside
the unicode flags. The new regexp_syntax module ports the error checks of
JavaScriptCore's YarrParser as Bun ships it (escapes, classes, v-mode class
sets and string disjunctions, groups and modifiers, quantifiers, named and
numbered references with the legacy reparse), and finds the first error in
the order that parser meets it, with its message ('missing )', 'nothing to
repeat'). regress answers the Unicode questions: property names and the
characters of group names. A random sample of 9,000 patterns over the three
flag modes matches the reference's validity and message for every one.

It also covers \k inside a class with named groups, which the duplicate
named groups rewrite used to check.
2026-11-18 18:56:11 +01:00