Skip to content

Commit ada19a2

Browse files
committed
Improve scoping of regular expression components
This better lines up with the scopes given in other languages to these items.
1 parent a6a1701 commit ada19a2

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

Syntaxes/Ruby.plist

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3963,34 +3963,42 @@
39633963
<key>1</key>
39643964
<dict>
39653965
<key>name</key>
3966-
<string>punctuation.definition.arbitrary-repitition.ruby</string>
3966+
<string>punctuation.definition.quantifier.begin.ruby</string>
39673967
</dict>
39683968
<key>3</key>
39693969
<dict>
39703970
<key>name</key>
3971-
<string>punctuation.definition.arbitrary-repitition.ruby</string>
3971+
<string>punctuation.definition.quantifier.end.ruby</string>
39723972
</dict>
39733973
</dict>
39743974
<key>match</key>
39753975
<string>(\{)\d+(,\d+)?(\})</string>
39763976
<key>name</key>
3977-
<string>string.regexp.arbitrary-repitition.ruby</string>
3977+
<string>keyword.operator.quantifier.ruby</string>
39783978
</dict>
39793979
<dict>
39803980
<key>begin</key>
39813981
<string>\[(?:\^?\])?</string>
3982-
<key>captures</key>
3982+
<key>beginCaptures</key>
39833983
<dict>
39843984
<key>0</key>
39853985
<dict>
39863986
<key>name</key>
3987-
<string>punctuation.definition.character-class.ruby</string>
3987+
<string>punctuation.definition.character-class.begin.ruby</string>
39883988
</dict>
39893989
</dict>
39903990
<key>end</key>
39913991
<string>\]</string>
3992+
<key>endCaptures</key>
3993+
<dict>
3994+
<key>0</key>
3995+
<dict>
3996+
<key>name</key>
3997+
<string>punctuation.definition.character-class.end.ruby</string>
3998+
</dict>
3999+
</dict>
39924000
<key>name</key>
3993-
<string>string.regexp.character-class.ruby</string>
4001+
<string>constant.other.character-class.set.ruby</string>
39944002
<key>patterns</key>
39954003
<array>
39964004
<dict>
@@ -4044,7 +4052,7 @@
40444052
<key>end</key>
40454053
<string>\)</string>
40464054
<key>name</key>
4047-
<string>string.regexp.group.ruby</string>
4055+
<string>meta.group.regexp.ruby</string>
40484056
<key>patterns</key>
40494057
<array>
40504058
<dict>
@@ -4068,14 +4076,6 @@
40684076
<string>We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.</string>
40694077
<key>end</key>
40704078
<string>$\n?</string>
4071-
<key>endCaptures</key>
4072-
<dict>
4073-
<key>0</key>
4074-
<dict>
4075-
<key>name</key>
4076-
<string>punctuation.definition.comment.ruby</string>
4077-
</dict>
4078-
</dict>
40794079
<key>name</key>
40804080
<string>comment.line.number-sign.ruby</string>
40814081
</dict>

0 commit comments

Comments
 (0)