File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ import { TmLanguage } from "./TMLanguageModel";
44const letter = "[_a-zA-Z\\$\\p{Lo}\\p{Lt}\\p{Nl}\\p{Ll}\\p{Lu}]"
55const digit = "[0-9]"
66const letterOrDigit = `${ letter } |${ digit } `
7+ const opchar = `[!#%&*+\\-\\/:<>=?@\\\\^|~[\\p{Sm}\\p{So}]]`
8+ const op = `${ opchar } +`
9+ const idrest = `${ letter } (?:${ letterOrDigit } )*(?:_${ op } )?`
10+ const alphaId = `${ letter } +`
711const simpleInterpolatedVariable = `${ letter } (?:${ letterOrDigit } )*` // see SIP-11 https://docs.scala-lang.org/sips/string-interpolation.html
812
913export const scalaTmLanguage : TmLanguage = {
@@ -223,7 +227,7 @@ export const scalaTmLanguage: TmLanguage = {
223227 name : 'string.quoted.triple.scala'
224228 } ,
225229 {
226- begin : ' \\b(s|f|raw )(""")' ,
230+ begin : ` \\b(${ alphaId } )(""")` ,
227231 end : '"""(?!")' ,
228232 beginCaptures : {
229233 '1' : {
@@ -278,7 +282,7 @@ export const scalaTmLanguage: TmLanguage = {
278282 name : 'string.quoted.double.scala'
279283 } ,
280284 {
281- begin : ' \\b(s|f|raw )(")' ,
285+ begin : ` \\b(${ alphaId } )(")` ,
282286 end : '"' ,
283287 beginCaptures : {
284288 '1' : {
You can’t perform that action at this time.
0 commit comments