Skip to content

Fix github formatting #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 14 additions & 19 deletions src/typescript/Scala.tmLanguage.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
"use strict";
import { TmLanguage } from "./TMLanguageModel";

const upperLetter = "[A-Z\\p{Lt}\\p{Lu}]"
const lowerLetter = "[_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}]"
const letter = `[${upperLetter}${lowerLetter}]`
const digit = "[0-9]"
const letterOrDigit = `${letter}|${digit}`
const upperLetterChars = "A-Z\\p{Lt}\\p{Lu}"
const upperLetter = `[${upperLetterChars}]`
const lowerLetterChars = "_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}"
const lowerLetter = `[${lowerLetterChars}]`
const letterChars = `${upperLetterChars}${lowerLetterChars}`
const letter = `[${letterChars}]`
const letterOrDigitChars = `${letterChars}0-9`
const letterOrDigit = `[${letterOrDigitChars}]`
const alphaId = `${letter}+`
const simpleInterpolatedVariable = `${letter}(?:${letterOrDigit})*` // see SIP-11 https://docs.scala-lang.org/sips/string-interpolation.html
const opchar = `[!#%&*+\\-\\/:<>=?@^|~[\\p{Sm}\\p{So}]]`
const idrest = `${letter}(?:${letterOrDigit})*(?:(?<=_)${opchar}+)?`
const idUpper = `${upperLetter}(?:${letterOrDigit})*(?:(?<=_)${opchar}+)?`
const idLower = `${lowerLetter}(?:${letterOrDigit})*(?:(?<=_)${opchar}+)?`
const plainid = `(?:${idrest}|(?:${opchar})+)`
const simpleInterpolatedVariable = `${letter}${letterOrDigit}*` // see SIP-11 https://docs.scala-lang.org/sips/string-interpolation.html
const opchar = `[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]`
const idrest = `${letter}${letterOrDigit}*(?:(?<=_)${opchar}+)?`
const idUpper = `${upperLetter}${letterOrDigit}*(?:(?<=_)${opchar}+)?`
const idLower = `${lowerLetter}${letterOrDigit}*(?:(?<=_)${opchar}+)?`
const plainid = `(?:${idrest}|${opchar}+)`
const backQuotedId = "`[^`]+`"


Expand Down Expand Up @@ -179,9 +182,6 @@ export const scalaTmLanguage: TmLanguage = {
{
include: '#scala-quoted'
},
{
include: '#special-identifier'
},
{
include: '#char-literal'
},
Expand All @@ -205,10 +205,6 @@ export const scalaTmLanguage: TmLanguage = {
}
]
},
'special-identifier': {
match: '\\b[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\\t .,;()\\[\\]{}\'"`\\w])',
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.'
},
strings: {
patterns: [
{
Expand Down Expand Up @@ -918,7 +914,6 @@ export const scalaTmLanguage: TmLanguage = {
}
},
uuid: '158C0929-299A-40C8-8D89-316BE0C446E8',
"$schema" : "https://raw.githubusercontent.com/Septh/tmlanguage/master/tmLanguage.schema.json",
patterns: [
{
include: '#code'
Expand Down
Loading