File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -577,18 +577,18 @@ export const scalaTmLanguage: TmLanguage = {
577577 inline : {
578578 patterns : [
579579 {
580- match : `\\b(inline)\\b(?=(\\s+(?: ${ plainid } | ${ backQuotedId } )\\s*:)|(.*( val|def) ))` ,
580+ match : `\\b(inline)\\b(?=(?:.(?! val|def|given))*(if|match ))` ,
581581 captures : {
582582 '1' : {
583- name : 'storage.modifier.other '
583+ name : 'keyword.control.flow.scala '
584584 }
585585 }
586586 } ,
587587 {
588- match : `\\b(inline)\\b (?=.*(if|match ))` ,
588+ match : `\\b(inline)\\s+ (?=(([\\w\\s]*(val|def|given))|( ${ plainid } | ${ backQuotedId } )\\s*: ))` ,
589589 captures : {
590590 '1' : {
591- name : 'keyword.control.flow.scala '
591+ name : 'storage.modifier.other '
592592 }
593593 }
594594 }
Original file line number Diff line number Diff line change @@ -39,3 +39,15 @@ val x = inline[T]
3939// ^^^^^^ entity.name.function.declaration
4040// ^^^^^^ storage.modifier.other
4141// ^^^^^^ variable.parameter.scala
42+
43+ inline if (n == 0 ) 1 else 2 ; val x = 2
44+ // ^^^^^^ keyword.control.flow.scala
45+ // ^^ keyword.control.flow.scala
46+
47+ inline if (n == 0 ) 1 else 2 ; def x = 2
48+ // ^^^^^^ keyword.control.flow.scala
49+ // ^^ keyword.control.flow.scala
50+
51+ inline f[X ](x : X ) match {
52+ // ^^^^^^ keyword.control.flow.scala
53+ // ^^^^^ keyword.control.flow.scala
Original file line number Diff line number Diff line change 1+ // SYNTAX TEST "source.scala"
2+
3+
4+ inline def mkDefaultTypeable [T ]: Typeable [T ] = $ { TypeableMacros .impl[T ] }
5+ // ^^^^^^ storage.modifier.other
6+ // ^^^ keyword.declaration.scala
7+
8+ inline given [T ] as Typeable [T ] = mkDefaultTypeable[T ]
9+ // ^^^^^^ storage.modifier.other
10+ // ^^^^^ keyword.declaration.scala
You can’t perform that action at this time.
0 commit comments