File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -864,13 +864,26 @@ export const scalaTmLanguage: TmLanguage = {
864
864
} ,
865
865
extension : {
866
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
+ } ,
867
881
{
868
882
match : `(extension)\\s+(?=[\\[\\(])` ,
869
883
captures : {
870
884
'1' : {
871
885
name : 'keyword.declaration.scala'
872
886
} ,
873
-
874
887
}
875
888
}
876
889
]
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