Skip to content

Commit 5211d13

Browse files
authored
Merge pull request #34 from PanAeon/feature/github
Fix github formatting
2 parents 387fe81 + 0be6724 commit 5211d13

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

src/typescript/Scala.tmLanguage.ts

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
"use strict";
22
import { TmLanguage } from "./TMLanguageModel";
33

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}]`
912
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}+)`
1619
const backQuotedId = "`[^`]+`"
1720

1821

@@ -179,9 +182,6 @@ export const scalaTmLanguage: TmLanguage = {
179182
{
180183
include: '#scala-quoted'
181184
},
182-
{
183-
include: '#special-identifier'
184-
},
185185
{
186186
include: '#char-literal'
187187
},
@@ -205,10 +205,6 @@ export const scalaTmLanguage: TmLanguage = {
205205
}
206206
]
207207
},
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-
},
212208
strings: {
213209
patterns: [
214210
{
@@ -918,7 +914,6 @@ export const scalaTmLanguage: TmLanguage = {
918914
}
919915
},
920916
uuid: '158C0929-299A-40C8-8D89-316BE0C446E8',
921-
"$schema" : "https://raw.githubusercontent.com/Septh/tmlanguage/master/tmLanguage.schema.json",
922917
patterns: [
923918
{
924919
include: '#code'

0 commit comments

Comments
 (0)