File tree 2 files changed +44
-0
lines changed
2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,9 @@ export const scalaTmLanguage: TmLanguage = {
150
150
{
151
151
include : '#inheritance'
152
152
} ,
153
+ {
154
+ include : '#extension'
155
+ } ,
153
156
{
154
157
include : '#imports'
155
158
} ,
@@ -859,6 +862,24 @@ export const scalaTmLanguage: TmLanguage = {
859
862
}
860
863
]
861
864
} ,
865
+ extension : {
866
+ patterns : [
867
+ {
868
+ match : `(extension)\\s+(?:(${ plainid } )\\s)?\\s*(on|(?=\\{))` ,
869
+ captures : {
870
+ '1' : {
871
+ name : 'keyword.declaration.scala'
872
+ } ,
873
+ '2' : {
874
+ name : 'entity.name.class'
875
+ } ,
876
+ '3' : {
877
+ name : 'keyword.declaration.scala'
878
+ }
879
+ }
880
+ }
881
+ ]
882
+ } ,
862
883
'parameter-list' : {
863
884
patterns : [
864
885
{
Original file line number Diff line number Diff line change
1
+ // SYNTAX TEST "source.scala"
2
+
3
+ extension on (x : Rational ):
4
+ // ^^^^^^^^^ keyword.declaration.scala
5
+ // ^^ keyword.declaration.scala
6
+ // ^ variable.parameter.scala
7
+ // ^^^^^^^^ entity.name.class
8
+ def > (y : Rational ): Boolean = y < x
9
+
10
+ extension Ops on (x : Rational ):
11
+ // ^^^^^^^^^ keyword.declaration.scala
12
+ // ^^^ entity.name.class
13
+ // ^^ keyword.declaration.scala
14
+ // ^ variable.parameter.scala
15
+ // ^^^^^^^^ entity.name.class
16
+ def > (y : Rational ): Boolean = y < x
17
+
18
+ extension stringOps { }
19
+ // ^^^^^^^^^ keyword.declaration.scala
20
+ // ^^^^^^^^^ entity.name.class
21
+
22
+ extension { }
23
+ // ^^^^^^^^^ keyword.declaration.scala
You can’t perform that action at this time.
0 commit comments