1
1
"use strict" ;
2
2
import { TmLanguage } from "./TMLanguageModel" ;
3
3
4
- const upperLetter = "[A-Z\\p{Lt}\\p{Lu}]"
5
- const lowerLetter = "[_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}]"
6
- const letter = `[${ upperLetter } ${ lowerLetter } ]`
7
- const digit = "[0-9]"
8
- const letterOrDigit = `${ letter } |${ digit } `
4
+ const upperLetterChars = "A-Z\\p{Lt}\\p{Lu}"
5
+ const upperLetter = `[${ upperLetterChars } ]`
6
+ const lowerLetterChars = "_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}"
7
+ const lowerLetter = `[${ lowerLetterChars } ]`
8
+ const letterChars = `${ upperLetterChars } ${ lowerLetterChars } `
9
+ const letter = `[${ letterChars } ]`
10
+ const letterOrDigitChars = `${ letterChars } 0-9`
11
+ const letterOrDigit = `[${ letterOrDigitChars } ]`
9
12
const alphaId = `${ letter } +`
10
- const simpleInterpolatedVariable = `${ letter } (?: ${ letterOrDigit } ) *` // see SIP-11 https://docs.scala-lang.org/sips/string-interpolation.html
11
- const opchar = `[!#%&*+\\-\\/:<>=?@^|~[ \\p{Sm}\\p{So}] ]`
12
- const idrest = `${ letter } (?: ${ letterOrDigit } ) *(?:(?<=_)${ opchar } +)?`
13
- const idUpper = `${ upperLetter } (?: ${ letterOrDigit } ) *(?:(?<=_)${ opchar } +)?`
14
- const idLower = `${ lowerLetter } (?: ${ letterOrDigit } ) *(?:(?<=_)${ opchar } +)?`
15
- const plainid = `(?:${ idrest } |(?: ${ opchar } ) +)`
13
+ const simpleInterpolatedVariable = `${ letter } ${ letterOrDigit } *` // see SIP-11 https://docs.scala-lang.org/sips/string-interpolation.html
14
+ const opchar = `[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]`
15
+ const idrest = `${ letter } ${ letterOrDigit } *(?:(?<=_)${ opchar } +)?`
16
+ const idUpper = `${ upperLetter } ${ letterOrDigit } *(?:(?<=_)${ opchar } +)?`
17
+ const idLower = `${ lowerLetter } ${ letterOrDigit } *(?:(?<=_)${ opchar } +)?`
18
+ const plainid = `(?:${ idrest } |${ opchar } +)`
16
19
const backQuotedId = "`[^`]+`"
17
20
18
21
@@ -179,9 +182,6 @@ export const scalaTmLanguage: TmLanguage = {
179
182
{
180
183
include : '#scala-quoted'
181
184
} ,
182
- {
183
- include : '#special-identifier'
184
- } ,
185
185
{
186
186
include : '#char-literal'
187
187
} ,
@@ -205,10 +205,6 @@ export const scalaTmLanguage: TmLanguage = {
205
205
}
206
206
]
207
207
} ,
208
- 'special-identifier' : {
209
- match : '\\b[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\\t .,;()\\[\\]{}\'"`\\w])' ,
210
- comment : 'Match special scala style identifiers that can end with and underscore and a a not letter such as blank_?. This way the symbol will not be colored differently.'
211
- } ,
212
208
strings : {
213
209
patterns : [
214
210
{
@@ -918,7 +914,6 @@ export const scalaTmLanguage: TmLanguage = {
918
914
}
919
915
} ,
920
916
uuid : '158C0929-299A-40C8-8D89-316BE0C446E8' ,
921
- "$schema" : "https://raw.githubusercontent.com/Septh/tmlanguage/master/tmLanguage.schema.json" ,
922
917
patterns : [
923
918
{
924
919
include : '#code'
0 commit comments