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 {
581
581
RegExpWordBoundary ( ) { this .getChar ( ) = "\\b" }
582
582
}
583
583
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
+
584
593
/**
585
594
* A character class escape in a regular expression.
586
595
* 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:
266
266
# 43| [RegExpSequence] \b!a\B
267
267
#-----| 0 -> [RegExpSpecialChar] \b
268
268
#-----| 1 -> [RegExpConstant, RegExpNormalChar] !a
269
- #-----| 2 -> [RegExpSpecialChar ] \B
269
+ #-----| 2 -> [RegExpNonWordBoundary ] \B
270
270
271
271
# 43| [RegExpConstant, RegExpNormalChar] !a
272
272
273
- # 43| [RegExpSpecialChar ] \B
273
+ # 43| [RegExpNonWordBoundary ] \B
274
274
275
275
# 46| [RegExpGroup] (foo)
276
276
#-----| 0 -> [RegExpConstant, RegExpNormalChar] foo
Original file line number Diff line number Diff line change 108
108
| regexp.rb:43:2:43:3 | \\b | RegExpSpecialChar |
109
109
| regexp.rb:43:2:43:7 | \\b!a\\B | RegExpSequence |
110
110
| 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 |
112
112
| regexp.rb:46:2:46:6 | (foo) | RegExpGroup |
113
113
| regexp.rb:46:2:46:7 | (foo)* | RegExpStar |
114
114
| regexp.rb:46:2:46:10 | (foo)*bar | RegExpSequence |
You can’t perform that action at this time.
0 commit comments