File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ pp.regexp_pattern = function(state) {
152152 if ( state . eat ( 0x29 /* ) */ ) ) {
153153 state . raise ( "Unmatched ')'" )
154154 }
155- if ( state . eat ( 0x5D /* [ */ ) || state . eat ( 0x7D /* } */ ) ) {
155+ if ( state . eat ( 0x5D /* ] */ ) || state . eat ( 0x7D /* } */ ) ) {
156156 state . raise ( "Lone quantifier brackets" )
157157 }
158158 }
@@ -837,7 +837,7 @@ pp.regexp_eatCharacterClass = function(state) {
837837 if ( state . eat ( 0x5B /* [ */ ) ) {
838838 state . eat ( 0x5E /* ^ */ )
839839 this . regexp_classRanges ( state )
840- if ( state . eat ( 0x5D /* [ */ ) ) {
840+ if ( state . eat ( 0x5D /* ] */ ) ) {
841841 return true
842842 }
843843 // Unreachable since it threw "unterminated regular expression" error before.
@@ -885,7 +885,7 @@ pp.regexp_eatClassAtom = function(state) {
885885 }
886886
887887 const ch = state . current ( )
888- if ( ch !== 0x5D /* [ */ ) {
888+ if ( ch !== 0x5D /* ] */ ) {
889889 state . lastIntValue = ch
890890 state . advance ( )
891891 return true
You can’t perform that action at this time.
0 commit comments