Skip to content

Commit 9553c6e

Browse files
committed
Remove $ as possible character in simple interpolated variable name
1 parent 37c1f36 commit 9553c6e

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

src/typescript/Scala.tmLanguage.ts

+2-1
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)