Skip to content

Commit 3eb5060

Browse files
committed
Handle val with string interpolation pattern
Fixes scala#233
1 parent c8b05b9 commit 3eb5060

File tree

3 files changed

+37
-3
lines changed

3 files changed

+37
-3
lines changed

src/typescript/Scala.tmLanguage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ export const scalaTmLanguage: TmLanguage = {
803803
}
804804
},
805805
{ // val x1[, x2, x3, ...] = y
806-
match: `\\b(val)\\b\\s*${notStartOfComment}(${anyId}(?:\\s*,\\s*${anyId})*)?`,
806+
match: `\\b(val)\\b\\s*${notStartOfComment}(${anyId}(?!")(?:\\s*,\\s*${anyId})*)?`,
807807
captures: {
808808
'1': {
809809
name: 'keyword.declaration.stable.scala'
@@ -814,7 +814,7 @@ export const scalaTmLanguage: TmLanguage = {
814814
}
815815
},
816816
{ // var x1[, x2, x3, ...] = y
817-
match: `\\b(var)\\b\\s*${notStartOfComment}(${anyId}(?:\\s*,\\s*${anyId})*)?`,
817+
match: `\\b(var)\\b\\s*${notStartOfComment}(${anyId}(?!")(?:\\s*,\\s*${anyId})*)?`,
818818
captures: {
819819
'1': {
820820
name: 'keyword.declaration.volatile.scala'

0 commit comments

Comments
 (0)