File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
test/library-tests/regexp Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -581,6 +581,15 @@ class RegExpWordBoundary extends RegExpSpecialChar {
581581 RegExpWordBoundary ( ) { this .getChar ( ) = "\\b" }
582582}
583583
584+ /**
585+ * A non-word boundary, that is, a regular expression term of the form `\B`.
586+ */
587+ class RegExpNonWordBoundary extends RegExpSpecialChar {
588+ RegExpNonWordBoundary ( ) { this .getChar ( ) = "\\B" }
589+
590+ override string getAPrimaryQlClass ( ) { result = "RegExpNonWordBoundary" }
591+ }
592+
584593/**
585594 * A character class escape in a regular expression.
586595 * That is, an escaped character that denotes multiple characters.
Original file line number Diff line number Diff line change @@ -266,11 +266,11 @@ regexp.rb:
266266# 43| [RegExpSequence] \b!a\B
267267#-----| 0 -> [RegExpSpecialChar] \b
268268#-----| 1 -> [RegExpConstant, RegExpNormalChar] !a
269- #-----| 2 -> [RegExpSpecialChar ] \B
269+ #-----| 2 -> [RegExpNonWordBoundary ] \B
270270
271271# 43| [RegExpConstant, RegExpNormalChar] !a
272272
273- # 43| [RegExpSpecialChar ] \B
273+ # 43| [RegExpNonWordBoundary ] \B
274274
275275# 46| [RegExpGroup] (foo)
276276#-----| 0 -> [RegExpConstant, RegExpNormalChar] foo
Original file line number Diff line number Diff line change 108108| regexp.rb:43:2:43:3 | \\b | RegExpSpecialChar |
109109| regexp.rb:43:2:43:7 | \\b!a\\B | RegExpSequence |
110110| regexp.rb:43:4:43:5 | !a | RegExpConstant,RegExpNormalChar |
111- | regexp.rb:43:6:43:7 | \\B | RegExpSpecialChar |
111+ | regexp.rb:43:6:43:7 | \\B | RegExpNonWordBoundary |
112112| regexp.rb:46:2:46:6 | (foo) | RegExpGroup |
113113| regexp.rb:46:2:46:7 | (foo)* | RegExpStar |
114114| regexp.rb:46:2:46:10 | (foo)*bar | RegExpSequence |
You can’t perform that action at this time.
0 commit comments