File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ export type CharacterClassElement =
5959export type ClassRangesCharacterClassElement =
6060 | Character
6161 | CharacterClassRange
62+ | CharacterUnicodePropertyCharacterSet
6263 | EscapeCharacterSet
63- | UnicodePropertyCharacterSet
6464export type UnicodeSetsCharacterClassElement =
6565 | Character
6666 | CharacterClassRange
Original file line number Diff line number Diff line change @@ -444,7 +444,15 @@ class RegExpParserState {
444444 negate,
445445 strings : false ,
446446 }
447- parent . elements . push ( node )
447+
448+ if ( node . strings ) {
449+ if ( parent . type === "CharacterClass" && ! parent . unicodeSets ) {
450+ throw new Error ( "UnknownError" )
451+ }
452+ parent . elements . push ( node )
453+ } else {
454+ parent . elements . push ( node )
455+ }
448456 }
449457
450458 public onCharacter ( start : number , end : number , value : number ) : void {
You can’t perform that action at this time.
0 commit comments