Skip to content

Commit a9f610d

Browse files
committed
Remove $ as possible character in simple interpolated variable name
1 parent 7e9d18f commit a9f610d

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

src/typescript/Scala.tmLanguage.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const letter = `[${letterChars}]`
1010
const letterOrDigitChars = `${letterChars}0-9`
1111
const letterOrDigit = `[${letterOrDigitChars}]`
1212
const alphaId = `${letter}+`
13-
const simpleInterpolatedVariable = `${letter}${letterOrDigit}*` // see SIP-11 https://docs.scala-lang.org/sips/string-interpolation.html
13+
const letterOrDigitNoDollarSign = `[${letterOrDigit.replace("\\$", "")}]`
14+
const simpleInterpolatedVariable = `${letter}${letterOrDigitNoDollarSign}*` // see SIP-11 https://docs.scala-lang.org/sips/string-interpolation.html
1415
const opchar = `[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]`
1516
const idrest = `${letter}${letterOrDigit}*(?:(?<=_)${opchar}+)?`
1617
const idUpper = `${upperLetter}${letterOrDigit}*(?:(?<=_)${opchar}+)?`

0 commit comments

Comments
 (0)