diff --git a/package.json b/package.json index 224172c..b1d600a 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "build:extension": "vsce package --yarn", "test": "npm-run-all test:*", "test:unit": "vscode-tmgrammar-test -s source.scala -g syntaxes/Scala.tmLanguage.json -t 'tests/unit/**/*.test.scala'", - "test:snap": "vscode-tmgrammar-snap -s source.scala -g syntaxes/Scala.tmLanguage.json -t 'tests/snap/**/*.test.scala'" + "test:snap": "vscode-tmgrammar-snap -s source.scala -g syntaxes/Scala.tmLanguage.json -t 'tests/snap/**/*.test.scala'", + "update:snapshots": "vscode-tmgrammar-snap --updateSnapshot -s source.scala -g syntaxes/Scala.tmLanguage.json -t 'tests/snap/**/*.test.scala'" } } diff --git a/src/typescript/Scala.tmLanguage.ts b/src/typescript/Scala.tmLanguage.ts index 3ca1609..afbb596 100644 --- a/src/typescript/Scala.tmLanguage.ts +++ b/src/typescript/Scala.tmLanguage.ts @@ -802,28 +802,25 @@ export const scalaTmLanguage: TmLanguage = { } } }, - { // val x1, x2 = y - match: `\\b(?:(val)|(var))\\b\\s*${notStartOfComment}${anyId}(?=\\s*,)`, + { // val x1[, x2, x3, ...] = y + match: `\\b(val)\\b\\s*${notStartOfComment}(${anyId}(?:\\s*,\\s*${anyId})*)?`, captures: { '1': { name: 'keyword.declaration.stable.scala' }, '2': { - name: 'keyword.declaration.volatile.scala' + name: 'variable.stable.declaration.scala' } } }, - { - match: `\\b(?:(val)|(var))\\b\\s*${notStartOfComment}(${anyId})?`, + { // var x1[, x2, x3, ...] = y + match: `\\b(var)\\b\\s*${notStartOfComment}(${anyId}(?:\\s*,\\s*${anyId})*)?`, captures: { '1': { - name: 'keyword.declaration.stable.scala' - }, - '2': { name: 'keyword.declaration.volatile.scala' }, - '3': { - name: 'variable.other.declaration.scala' + '2': { + name: 'variable.volatile.declaration.scala' } } }, diff --git a/syntaxes/Scala.tmLanguage.json b/syntaxes/Scala.tmLanguage.json index ee43aa6..a186dfc 100644 --- a/syntaxes/Scala.tmLanguage.json +++ b/syntaxes/Scala.tmLanguage.json @@ -1 +1 @@ -{"fileTypes":["scala"],"firstLineMatch":"^#!/.*\\b\\w*scala\\b","foldingStartMarker":"/\\*\\*|\\{\\s*$","foldingStopMarker":"\\*\\*/|^\\s*\\}","keyEquivalent":"^~S","repository":{"empty-parentheses":{"match":"(\\(\\))","captures":{"1":{"name":"meta.bracket.scala"}},"name":"meta.parentheses.scala"},"imports":{"end":"(?<=[\\n;])","begin":"\\b(import)\\s+","beginCaptures":{"1":{"name":"keyword.other.import.scala"}},"patterns":[{"include":"#comments"},{"match":"\\b(given)\\b","name":"keyword.other.import.given.scala"},{"match":"[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?","name":"entity.name.class.import.scala"},{"match":"(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))","name":"entity.name.import.scala"},{"match":"\\.","name":"punctuation.definition.import"},{"end":"}","begin":"{","beginCaptures":{"0":{"name":"meta.bracket.scala"}},"patterns":[{"match":"(?x)(given\\s)?\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*(=>)\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*","captures":{"1":{"name":"keyword.other.import.given.scala"},"2":{"name":"entity.name.class.import.renamed-from.scala"},"3":{"name":"entity.name.import.renamed-from.scala"},"4":{"name":"keyword.other.arrow.scala"},"5":{"name":"entity.name.class.import.renamed-to.scala"},"6":{"name":"entity.name.import.renamed-to.scala"}}},{"match":"\\b(given)\\b","name":"keyword.other.import.given.scala"},{"match":"(given\\s+)?(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))","captures":{"1":{"name":"keyword.other.import.given.scala"},"2":{"name":"entity.name.class.import.scala"},"3":{"name":"entity.name.import.scala"}}}],"endCaptures":{"0":{"name":"meta.bracket.scala"}},"name":"meta.import.selector.scala"}],"name":"meta.import.scala"},"exports":{"end":"(?<=[\\n;])","begin":"\\b(export)\\s+","beginCaptures":{"1":{"name":"keyword.other.export.scala"}},"patterns":[{"include":"#comments"},{"match":"\\b(given)\\b","name":"keyword.other.export.given.scala"},{"match":"[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?","name":"entity.name.class.export.scala"},{"match":"(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))","name":"entity.name.export.scala"},{"match":"\\.","name":"punctuation.definition.export"},{"end":"}","begin":"{","beginCaptures":{"0":{"name":"meta.bracket.scala"}},"patterns":[{"match":"(?x)(given\\s)?\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*(=>)\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*","captures":{"1":{"name":"keyword.other.export.given.scala"},"2":{"name":"entity.name.class.export.renamed-from.scala"},"3":{"name":"entity.name.export.renamed-from.scala"},"4":{"name":"keyword.other.arrow.scala"},"5":{"name":"entity.name.class.export.renamed-to.scala"},"6":{"name":"entity.name.export.renamed-to.scala"}}},{"match":"\\b(given)\\b","name":"keyword.other.export.given.scala"},{"match":"(given\\s+)?(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))","captures":{"1":{"name":"keyword.other.export.given.scala"},"2":{"name":"entity.name.class.export.scala"},"3":{"name":"entity.name.export.scala"}}}],"endCaptures":{"0":{"name":"meta.bracket.scala"}},"name":"meta.export.selector.scala"}],"name":"meta.export.scala"},"constants":{"patterns":[{"match":"\\b(false|null|true)\\b","name":"constant.language.scala"},{"match":"\\b(0[xX][0-9a-fA-F_]*)\\b","name":"constant.numeric.scala"},{"match":"\\b(([0-9][0-9_]*(\\.[0-9][0-9_]*)?)([eE](\\+|-)?[0-9][0-9_]*)?|[0-9][0-9_]*)[LlFfDd]?\\b","name":"constant.numeric.scala"},{"match":"(\\.[0-9][0-9_]*)([eE](\\+|-)?[0-9][0-9_]*)?[LlFfDd]?\\b","name":"constant.numeric.scala"},{"match":"\\b(this|super)\\b","name":"variable.language.scala"}]},"script-header":{"match":"^#!(.*)$","captures":{"1":{"name":"string.unquoted.shebang.scala"}},"name":"comment.block.shebang.scala"},"code":{"patterns":[{"include":"#using-directive"},{"include":"#script-header"},{"include":"#storage-modifiers"},{"include":"#declarations"},{"include":"#inheritance"},{"include":"#extension"},{"include":"#imports"},{"include":"#exports"},{"include":"#comments"},{"include":"#strings"},{"include":"#initialization"},{"include":"#xml-literal"},{"include":"#keywords"},{"include":"#using"},{"include":"#constants"},{"include":"#scala-symbol"},{"include":"#singleton-type"},{"include":"#inline"},{"include":"#scala-quoted"},{"include":"#char-literal"},{"include":"#empty-parentheses"},{"include":"#parameter-list"},{"include":"#qualifiedClassName"},{"include":"#backQuotedVariable"},{"include":"#curly-braces"},{"include":"#meta-brackets"},{"include":"#meta-bounds"},{"include":"#meta-colons"}]},"strings":{"patterns":[{"end":"\"\"\"(?!\")","begin":"\"\"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.scala"}},"patterns":[{"match":"\\\\\\\\|\\\\u[0-9A-Fa-f]{4}","name":"constant.character.escape.scala"}],"endCaptures":{"0":{"name":"punctuation.definition.string.end.scala"}},"name":"string.quoted.triple.scala"},{"begin":"\\b(raw)(\"\"\")","end":"(\"\"\")(?!\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])","beginCaptures":{"1":{"name":"keyword.interpolation.scala"},"2":{"name":"string.quoted.triple.interpolated.scala punctuation.definition.string.begin.scala"}},"patterns":[{"match":"\\$[\\$\"]","name":"constant.character.escape.scala"},{"include":"#string-interpolation"},{"match":".","name":"string.quoted.triple.interpolated.scala"}],"endCaptures":{"1":{"name":"string.quoted.triple.interpolated.scala punctuation.definition.string.end.scala"},"2":{"name":"invalid.illegal.unrecognized-string-escape.scala"}}},{"begin":"\\b((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?))(\"\"\")","end":"(\"\"\")(?!\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])","beginCaptures":{"1":{"name":"keyword.interpolation.scala"},"2":{"name":"string.quoted.triple.interpolated.scala punctuation.definition.string.begin.scala"}},"patterns":[{"include":"#string-interpolation"},{"match":"\\\\\\\\|\\\\u[0-9A-Fa-f]{4}","name":"constant.character.escape.scala"},{"match":".","name":"string.quoted.triple.interpolated.scala"}],"endCaptures":{"1":{"name":"string.quoted.triple.interpolated.scala punctuation.definition.string.end.scala"},"2":{"name":"invalid.illegal.unrecognized-string-escape.scala"}}},{"end":"\"","begin":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.scala"}},"patterns":[{"match":"\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})","name":"constant.character.escape.scala"},{"match":"\\\\.","name":"invalid.illegal.unrecognized-string-escape.scala"}],"endCaptures":{"0":{"name":"punctuation.definition.string.end.scala"}},"name":"string.quoted.double.scala"},{"begin":"\\b(raw)(\")","end":"(\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])","beginCaptures":{"1":{"name":"keyword.interpolation.scala"},"2":{"name":"string.quoted.double.interpolated.scala punctuation.definition.string.begin.scala"}},"patterns":[{"match":"\\$[\\$\"]","name":"constant.character.escape.scala"},{"include":"#string-interpolation"},{"match":".","name":"string.quoted.double.interpolated.scala"}],"endCaptures":{"1":{"name":"string.quoted.double.interpolated.scala punctuation.definition.string.end.scala"},"2":{"name":"invalid.illegal.unrecognized-string-escape.scala"}}},{"begin":"\\b((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?))(\")","end":"(\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])","beginCaptures":{"1":{"name":"keyword.interpolation.scala"},"2":{"name":"string.quoted.double.interpolated.scala punctuation.definition.string.begin.scala"}},"patterns":[{"match":"\\$[\\$\"]","name":"constant.character.escape.scala"},{"include":"#string-interpolation"},{"match":"\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})","name":"constant.character.escape.scala"},{"match":"\\\\.","name":"invalid.illegal.unrecognized-string-escape.scala"},{"match":".","name":"string.quoted.double.interpolated.scala"}],"endCaptures":{"1":{"name":"string.quoted.double.interpolated.scala punctuation.definition.string.end.scala"},"2":{"name":"invalid.illegal.unrecognized-string-escape.scala"}}}]},"using":{"patterns":[{"match":"(?<=\\()\\s*(using)\\s","captures":{"1":{"name":"keyword.declaration.scala"}}}]},"string-interpolation":{"patterns":[{"name":"constant.character.escape.interpolation.scala","match":"\\$\\$"},{"name":"meta.template.expression.scala","match":"(\\$)([A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\p{Lo}\\p{Nl}\\p{Ll}0-9]*)","captures":{"1":{"name":"punctuation.definition.template-expression.begin.scala"}}},{"name":"meta.template.expression.scala","begin":"\\$\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.scala"}},"end":"\\}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.scala"}},"patterns":[{"include":"#code"}],"contentName":"meta.embedded.line.scala"}]},"xml-entity":{"match":"(&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;)","captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"name":"constant.character.entity.xml"},"xml-singlequotedString":{"end":"'","begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"patterns":[{"include":"#xml-entity"}],"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml"},"meta-colons":{"patterns":[{"match":"(?=?@^|~\\p{Sm}\\p{So}]+)?))(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)","captures":{"1":{"name":"keyword.declaration.end.scala"},"2":{"name":"keyword.declaration.end.scala"},"3":{"name":"entity.name.type.declaration"}}},{"match":"\\b(catch|finally|try)\\b","name":"keyword.control.exception.scala"},{"match":"^\\s*(end)\\s+(try)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)","name":"keyword.control.exception.end.scala"},{"match":"^\\s*(end)\\s+(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))?(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)","captures":{"1":{"name":"keyword.declaration.end.scala"},"2":{"name":"entity.name.declaration"}}},{"match":"(==?|!=|<=|>=|<>|<|>)","name":"keyword.operator.comparison.scala"},{"match":"(\\-|\\+|\\*|/(?![/*])|%|~)","name":"keyword.operator.arithmetic.scala"},{"match":"(?=?@^|~\\p{Sm}\\p{So}]|_)(!|&&|\\|\\|)(?![!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}])","name":"keyword.operator.logical.scala"},{"match":"(<-|←|->|→|=>|⇒|\\?|\\:+|@|\\|)+","name":"keyword.operator.scala"}]},"singleton-type":{"match":"\\.(type)(?![A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[0-9])","captures":{"1":{"name":"keyword.type.scala"}}},"inline":{"patterns":[{"match":"\\b(inline)(?=\\s+((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)\\s*:)","name":"storage.modifier.other"},{"match":"\\b(inline)\\b(?=(?:.(?!\\b(?:val|def|given)\\b))*\\b(if|match)\\b)","name":"keyword.control.flow.scala"}]},"scala-quoted":{"patterns":[{"match":"['$]\\{(?!')","name":"punctuation.section.block.begin.scala"},{"match":"'\\[(?!')","name":"meta.bracket.scala"}]},"xml-doublequotedString":{"end":"\"","begin":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"patterns":[{"include":"#xml-entity"}],"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml"},"declarations":{"patterns":[{"match":"\\b(def)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"entity.name.function.declaration"}}},{"match":"\\b(trait)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"entity.name.class.declaration"}}},{"match":"\\b(?:(case)\\s+)?(class|object|enum)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"keyword.declaration.scala"},"3":{"name":"entity.name.class.declaration"}}},{"match":"(?=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"entity.name.type.declaration"}}},{"match":"\\b(?:(val)|(var))\\b\\s*(?!//|/\\*)(?=(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)?\\()","captures":{"1":{"name":"keyword.declaration.stable.scala"},"2":{"name":"keyword.declaration.volatile.scala"}}},{"match":"\\b(?:(val)|(var))\\b\\s*(?!//|/\\*)(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)(?=\\s*,)","captures":{"1":{"name":"keyword.declaration.stable.scala"},"2":{"name":"keyword.declaration.volatile.scala"}}},{"match":"\\b(?:(val)|(var))\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?","captures":{"1":{"name":"keyword.declaration.stable.scala"},"2":{"name":"keyword.declaration.volatile.scala"},"3":{"name":"variable.other.declaration.scala"}}},{"match":"\\b(package)\\s+(object)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?","captures":{"1":{"name":"keyword.other.scoping.scala"},"2":{"name":"keyword.declaration.scala"},"3":{"name":"entity.name.class.declaration"}}},{"end":"(?<=[\\n;])","begin":"\\b(package)\\s+","beginCaptures":{"1":{"name":"keyword.other.import.scala"}},"patterns":[{"include":"#comments"},{"match":"(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))","name":"entity.name.package.scala"},{"match":"\\.","name":"punctuation.definition.package"}],"name":"meta.package.scala"},{"match":"\\b(given)\\b\\s*([_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`)?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"entity.name.given.declaration"}}}]},"char-literal":{"end":"'|$","begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.character.begin.scala"}},"patterns":[{"match":"\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})","name":"constant.character.escape.scala"},{"match":"\\\\.","name":"invalid.illegal.unrecognized-character-escape.scala"},{"match":"[^']{2,}","name":"invalid.illegal.character-literal-too-long"},{"match":"(?'(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))(?!')","name":"constant.other.symbol.scala"},"curly-braces":{"begin":"\\{","end":"\\}","beginCaptures":{"0":{"name":"punctuation.section.block.begin.scala"}},"endCaptures":{"0":{"name":"punctuation.section.block.end.scala"}},"patterns":[{"include":"#code"}]},"meta-brackets":{"patterns":[{"match":"\\{","comment":"The punctuation.section.*.begin is needed for return snippet in source bundle","name":"punctuation.section.block.begin.scala"},{"match":"\\}","comment":"The punctuation.section.*.end is needed for return snippet in source bundle","name":"punctuation.section.block.end.scala"},{"match":"{|}|\\(|\\)|\\[|\\]","name":"meta.bracket.scala"}],"comment":"For themes: Brackets look nice when colored."},"qualifiedClassName":{"match":"(\\b([A-Z][\\w]*)(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)","captures":{"1":{"name":"entity.name.class"}}},"backQuotedVariable":{"match":"`[^`]+`"},"storage-modifiers":{"patterns":[{"match":"\\b(private\\[\\S+\\]|protected\\[\\S+\\]|private|protected)\\b","name":"storage.modifier.access"},{"match":"\\b(synchronized|@volatile|abstract|final|lazy|sealed|implicit|override|@transient|@native)\\b","name":"storage.modifier.other"},{"match":"(?<=^|\\s)\\b(transparent|opaque|infix|open|inline)\\b(?=[a-z\\s]*\\b(def|val|var|given|type|class|trait|object|enum)\\b)","name":"storage.modifier.other"}]},"meta-bounds":{"match":"<%|=:=|<:<|<%<|>:|<:","comment":"For themes: Matching view bounds","name":"meta.bounds.scala"},"using-directive":{"end":"\\n","begin":"^\\s*(//>)\\s*(using)[^\\S\\n]+","beginCaptures":{"1":{"name":"punctuation.definition.comment.scala"},"2":{"name":"keyword.other.import.scala"}},"patterns":[{"match":"[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)","name":"entity.name.import.scala"},{"match":"\\.","name":"punctuation.definition.import"},{"include":"#strings"},{"include":"#constants"}],"name":"comment.line.shebang.scala"},"comments":{"patterns":[{"include":"#block-comments"},{"end":"(?!\\G)","begin":"(^[ \\t]+)?(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.scala"}},"patterns":[{"end":"\\n","begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.scala"}},"name":"comment.line.double-slash.scala"}]}]},"block-comments":{"patterns":[{"match":"/\\*\\*/","captures":{"0":{"name":"punctuation.definition.comment.scala"}},"name":"comment.block.empty.scala"},{"end":"\\*/","begin":"^\\s*(/\\*\\*)(?!/)","beginCaptures":{"1":{"name":"punctuation.definition.comment.scala"}},"patterns":[{"match":"(@param)\\s+(\\S+)","captures":{"1":{"name":"keyword.other.documentation.scaladoc.scala"},"2":{"name":"variable.parameter.scala"}}},{"match":"(@(?:tparam|throws))\\s+(\\S+)","captures":{"1":{"name":"keyword.other.documentation.scaladoc.scala"},"2":{"name":"entity.name.class"}}},{"match":"@(return|see|note|example|constructor|usecase|author|version|since|todo|deprecated|migration|define|inheritdoc)\\b","name":"keyword.other.documentation.scaladoc.scala"},{"match":"(\\[\\[)([^\\]]+)(\\]\\])","captures":{"1":{"name":"punctuation.definition.documentation.link.scala"},"2":{"name":"string.other.link.title.markdown"},"3":{"name":"punctuation.definition.documentation.link.scala"}}},{"include":"#block-comments"}],"endCaptures":{"0":{"name":"punctuation.definition.comment.scala"}},"name":"comment.block.documentation.scala"},{"end":"\\*/","begin":"/\\*","captures":{"0":{"name":"punctuation.definition.comment.scala"}},"patterns":[{"include":"#block-comments"}],"name":"comment.block.scala"}]},"xml-embedded-content":{"patterns":[{"end":"}","begin":"{","patterns":[{"include":"#code"}],"captures":{"0":{"name":"meta.bracket.scala"}},"name":"meta.source.embedded.scala"},{"match":" (?:([-_a-zA-Z0-9]+)((:)))?([_a-zA-Z-]+)=","captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}}},{"include":"#xml-doublequotedString"},{"include":"#xml-singlequotedString"}]},"inheritance":{"patterns":[{"match":"\\b(extends|with|derives)\\b\\s*([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`|(?=\\([^\\)]+=>)|(?=(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))|(?=\"))?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"entity.name.class"}}}]},"extension":{"patterns":[{"match":"^\\s*(extension)\\s+(?=[\\[\\(])","captures":{"1":{"name":"keyword.declaration.scala"}}}]},"parameter-list":{"patterns":[{"match":"(?<=[^\\._$a-zA-Z0-9])(`[^`]+`|[_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)\\s*(:)\\s+","captures":{"1":{"name":"variable.parameter.scala"},"2":{"name":"meta.colon.scala"}}}]},"xml-literal":{"patterns":[{"end":"(>(<))/(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]*[_a-zA-Z0-9])(>)","begin":"(<)((?:([_a-zA-Z0-9][_a-zA-Z0-9]*)((:)))?([_a-zA-Z0-9][-_a-zA-Z0-9:]*))(?=(\\s[^>]*)?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"entity.name.tag.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"}},"patterns":[{"include":"#xml-embedded-content"}],"comment":"We do not allow a tag name to start with a - since this would likely conflict with the <- operator. This is not very common for tag names anyway. Also code such as -- if (val val3) will falsly be recognized as an xml tag. The solution is to put a space on either side of the comparison operator","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"meta.scope.between-tag-pair.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"entity.name.tag.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml"},{"end":"(/?>)","begin":"(]*?>)","patterns":[{"include":"#xml-embedded-content"}],"captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"name":"meta.tag.xml"},{"include":"#xml-entity"}]}},"uuid":"158C0929-299A-40C8-8D89-316BE0C446E8","patterns":[{"include":"#code"}],"name":"Scala","scopeName":"source.scala"} +{"fileTypes":["scala"],"firstLineMatch":"^#!/.*\\b\\w*scala\\b","foldingStartMarker":"/\\*\\*|\\{\\s*$","foldingStopMarker":"\\*\\*/|^\\s*\\}","keyEquivalent":"^~S","repository":{"empty-parentheses":{"match":"(\\(\\))","captures":{"1":{"name":"meta.bracket.scala"}},"name":"meta.parentheses.scala"},"imports":{"end":"(?<=[\\n;])","begin":"\\b(import)\\s+","beginCaptures":{"1":{"name":"keyword.other.import.scala"}},"patterns":[{"include":"#comments"},{"match":"\\b(given)\\b","name":"keyword.other.import.given.scala"},{"match":"[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?","name":"entity.name.class.import.scala"},{"match":"(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))","name":"entity.name.import.scala"},{"match":"\\.","name":"punctuation.definition.import"},{"end":"}","begin":"{","beginCaptures":{"0":{"name":"meta.bracket.scala"}},"patterns":[{"match":"(?x)(given\\s)?\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*(=>)\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*","captures":{"1":{"name":"keyword.other.import.given.scala"},"2":{"name":"entity.name.class.import.renamed-from.scala"},"3":{"name":"entity.name.import.renamed-from.scala"},"4":{"name":"keyword.other.arrow.scala"},"5":{"name":"entity.name.class.import.renamed-to.scala"},"6":{"name":"entity.name.import.renamed-to.scala"}}},{"match":"\\b(given)\\b","name":"keyword.other.import.given.scala"},{"match":"(given\\s+)?(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))","captures":{"1":{"name":"keyword.other.import.given.scala"},"2":{"name":"entity.name.class.import.scala"},"3":{"name":"entity.name.import.scala"}}}],"endCaptures":{"0":{"name":"meta.bracket.scala"}},"name":"meta.import.selector.scala"}],"name":"meta.import.scala"},"exports":{"end":"(?<=[\\n;])","begin":"\\b(export)\\s+","beginCaptures":{"1":{"name":"keyword.other.export.scala"}},"patterns":[{"include":"#comments"},{"match":"\\b(given)\\b","name":"keyword.other.export.given.scala"},{"match":"[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?","name":"entity.name.class.export.scala"},{"match":"(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))","name":"entity.name.export.scala"},{"match":"\\.","name":"punctuation.definition.export"},{"end":"}","begin":"{","beginCaptures":{"0":{"name":"meta.bracket.scala"}},"patterns":[{"match":"(?x)(given\\s)?\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*(=>)\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*","captures":{"1":{"name":"keyword.other.export.given.scala"},"2":{"name":"entity.name.class.export.renamed-from.scala"},"3":{"name":"entity.name.export.renamed-from.scala"},"4":{"name":"keyword.other.arrow.scala"},"5":{"name":"entity.name.class.export.renamed-to.scala"},"6":{"name":"entity.name.export.renamed-to.scala"}}},{"match":"\\b(given)\\b","name":"keyword.other.export.given.scala"},{"match":"(given\\s+)?(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))","captures":{"1":{"name":"keyword.other.export.given.scala"},"2":{"name":"entity.name.class.export.scala"},"3":{"name":"entity.name.export.scala"}}}],"endCaptures":{"0":{"name":"meta.bracket.scala"}},"name":"meta.export.selector.scala"}],"name":"meta.export.scala"},"constants":{"patterns":[{"match":"\\b(false|null|true)\\b","name":"constant.language.scala"},{"match":"\\b(0[xX][0-9a-fA-F_]*)\\b","name":"constant.numeric.scala"},{"match":"\\b(([0-9][0-9_]*(\\.[0-9][0-9_]*)?)([eE](\\+|-)?[0-9][0-9_]*)?|[0-9][0-9_]*)[LlFfDd]?\\b","name":"constant.numeric.scala"},{"match":"(\\.[0-9][0-9_]*)([eE](\\+|-)?[0-9][0-9_]*)?[LlFfDd]?\\b","name":"constant.numeric.scala"},{"match":"\\b(this|super)\\b","name":"variable.language.scala"}]},"script-header":{"match":"^#!(.*)$","captures":{"1":{"name":"string.unquoted.shebang.scala"}},"name":"comment.block.shebang.scala"},"code":{"patterns":[{"include":"#using-directive"},{"include":"#script-header"},{"include":"#storage-modifiers"},{"include":"#declarations"},{"include":"#inheritance"},{"include":"#extension"},{"include":"#imports"},{"include":"#exports"},{"include":"#comments"},{"include":"#strings"},{"include":"#initialization"},{"include":"#xml-literal"},{"include":"#keywords"},{"include":"#using"},{"include":"#constants"},{"include":"#scala-symbol"},{"include":"#singleton-type"},{"include":"#inline"},{"include":"#scala-quoted"},{"include":"#char-literal"},{"include":"#empty-parentheses"},{"include":"#parameter-list"},{"include":"#qualifiedClassName"},{"include":"#backQuotedVariable"},{"include":"#curly-braces"},{"include":"#meta-brackets"},{"include":"#meta-bounds"},{"include":"#meta-colons"}]},"strings":{"patterns":[{"end":"\"\"\"(?!\")","begin":"\"\"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.scala"}},"patterns":[{"match":"\\\\\\\\|\\\\u[0-9A-Fa-f]{4}","name":"constant.character.escape.scala"}],"endCaptures":{"0":{"name":"punctuation.definition.string.end.scala"}},"name":"string.quoted.triple.scala"},{"begin":"\\b(raw)(\"\"\")","end":"(\"\"\")(?!\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])","beginCaptures":{"1":{"name":"keyword.interpolation.scala"},"2":{"name":"string.quoted.triple.interpolated.scala punctuation.definition.string.begin.scala"}},"patterns":[{"match":"\\$[\\$\"]","name":"constant.character.escape.scala"},{"include":"#string-interpolation"},{"match":".","name":"string.quoted.triple.interpolated.scala"}],"endCaptures":{"1":{"name":"string.quoted.triple.interpolated.scala punctuation.definition.string.end.scala"},"2":{"name":"invalid.illegal.unrecognized-string-escape.scala"}}},{"begin":"\\b((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?))(\"\"\")","end":"(\"\"\")(?!\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])","beginCaptures":{"1":{"name":"keyword.interpolation.scala"},"2":{"name":"string.quoted.triple.interpolated.scala punctuation.definition.string.begin.scala"}},"patterns":[{"include":"#string-interpolation"},{"match":"\\\\\\\\|\\\\u[0-9A-Fa-f]{4}","name":"constant.character.escape.scala"},{"match":".","name":"string.quoted.triple.interpolated.scala"}],"endCaptures":{"1":{"name":"string.quoted.triple.interpolated.scala punctuation.definition.string.end.scala"},"2":{"name":"invalid.illegal.unrecognized-string-escape.scala"}}},{"end":"\"","begin":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.scala"}},"patterns":[{"match":"\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})","name":"constant.character.escape.scala"},{"match":"\\\\.","name":"invalid.illegal.unrecognized-string-escape.scala"}],"endCaptures":{"0":{"name":"punctuation.definition.string.end.scala"}},"name":"string.quoted.double.scala"},{"begin":"\\b(raw)(\")","end":"(\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])","beginCaptures":{"1":{"name":"keyword.interpolation.scala"},"2":{"name":"string.quoted.double.interpolated.scala punctuation.definition.string.begin.scala"}},"patterns":[{"match":"\\$[\\$\"]","name":"constant.character.escape.scala"},{"include":"#string-interpolation"},{"match":".","name":"string.quoted.double.interpolated.scala"}],"endCaptures":{"1":{"name":"string.quoted.double.interpolated.scala punctuation.definition.string.end.scala"},"2":{"name":"invalid.illegal.unrecognized-string-escape.scala"}}},{"begin":"\\b((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?))(\")","end":"(\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])","beginCaptures":{"1":{"name":"keyword.interpolation.scala"},"2":{"name":"string.quoted.double.interpolated.scala punctuation.definition.string.begin.scala"}},"patterns":[{"match":"\\$[\\$\"]","name":"constant.character.escape.scala"},{"include":"#string-interpolation"},{"match":"\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})","name":"constant.character.escape.scala"},{"match":"\\\\.","name":"invalid.illegal.unrecognized-string-escape.scala"},{"match":".","name":"string.quoted.double.interpolated.scala"}],"endCaptures":{"1":{"name":"string.quoted.double.interpolated.scala punctuation.definition.string.end.scala"},"2":{"name":"invalid.illegal.unrecognized-string-escape.scala"}}}]},"using":{"patterns":[{"match":"(?<=\\()\\s*(using)\\s","captures":{"1":{"name":"keyword.declaration.scala"}}}]},"string-interpolation":{"patterns":[{"name":"constant.character.escape.interpolation.scala","match":"\\$\\$"},{"name":"meta.template.expression.scala","match":"(\\$)([A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\p{Lo}\\p{Nl}\\p{Ll}0-9]*)","captures":{"1":{"name":"punctuation.definition.template-expression.begin.scala"}}},{"name":"meta.template.expression.scala","begin":"\\$\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.scala"}},"end":"\\}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.scala"}},"patterns":[{"include":"#code"}],"contentName":"meta.embedded.line.scala"}]},"xml-entity":{"match":"(&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;)","captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"name":"constant.character.entity.xml"},"xml-singlequotedString":{"end":"'","begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"patterns":[{"include":"#xml-entity"}],"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml"},"meta-colons":{"patterns":[{"match":"(?=?@^|~\\p{Sm}\\p{So}]+)?))(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)","captures":{"1":{"name":"keyword.declaration.end.scala"},"2":{"name":"keyword.declaration.end.scala"},"3":{"name":"entity.name.type.declaration"}}},{"match":"\\b(catch|finally|try)\\b","name":"keyword.control.exception.scala"},{"match":"^\\s*(end)\\s+(try)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)","name":"keyword.control.exception.end.scala"},{"match":"^\\s*(end)\\s+(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))?(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)","captures":{"1":{"name":"keyword.declaration.end.scala"},"2":{"name":"entity.name.declaration"}}},{"match":"(==?|!=|<=|>=|<>|<|>)","name":"keyword.operator.comparison.scala"},{"match":"(\\-|\\+|\\*|/(?![/*])|%|~)","name":"keyword.operator.arithmetic.scala"},{"match":"(?=?@^|~\\p{Sm}\\p{So}]|_)(!|&&|\\|\\|)(?![!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}])","name":"keyword.operator.logical.scala"},{"match":"(<-|←|->|→|=>|⇒|\\?|\\:+|@|\\|)+","name":"keyword.operator.scala"}]},"singleton-type":{"match":"\\.(type)(?![A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[0-9])","captures":{"1":{"name":"keyword.type.scala"}}},"inline":{"patterns":[{"match":"\\b(inline)(?=\\s+((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)\\s*:)","name":"storage.modifier.other"},{"match":"\\b(inline)\\b(?=(?:.(?!\\b(?:val|def|given)\\b))*\\b(if|match)\\b)","name":"keyword.control.flow.scala"}]},"scala-quoted":{"patterns":[{"match":"['$]\\{(?!')","name":"punctuation.section.block.begin.scala"},{"match":"'\\[(?!')","name":"meta.bracket.scala"}]},"xml-doublequotedString":{"end":"\"","begin":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"patterns":[{"include":"#xml-entity"}],"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml"},"declarations":{"patterns":[{"match":"\\b(def)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"entity.name.function.declaration"}}},{"match":"\\b(trait)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"entity.name.class.declaration"}}},{"match":"\\b(?:(case)\\s+)?(class|object|enum)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"keyword.declaration.scala"},"3":{"name":"entity.name.class.declaration"}}},{"match":"(?=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"entity.name.type.declaration"}}},{"match":"\\b(?:(val)|(var))\\b\\s*(?!//|/\\*)(?=(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)?\\()","captures":{"1":{"name":"keyword.declaration.stable.scala"},"2":{"name":"keyword.declaration.volatile.scala"}}},{"match":"\\b(val)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)(?:\\s*,\\s*(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))*)?","captures":{"1":{"name":"keyword.declaration.stable.scala"},"2":{"name":"variable.stable.declaration.scala"}}},{"match":"\\b(var)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)(?:\\s*,\\s*(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))*)?","captures":{"1":{"name":"keyword.declaration.volatile.scala"},"2":{"name":"variable.volatile.declaration.scala"}}},{"match":"\\b(package)\\s+(object)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?","captures":{"1":{"name":"keyword.other.scoping.scala"},"2":{"name":"keyword.declaration.scala"},"3":{"name":"entity.name.class.declaration"}}},{"end":"(?<=[\\n;])","begin":"\\b(package)\\s+","beginCaptures":{"1":{"name":"keyword.other.import.scala"}},"patterns":[{"include":"#comments"},{"match":"(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))","name":"entity.name.package.scala"},{"match":"\\.","name":"punctuation.definition.package"}],"name":"meta.package.scala"},{"match":"\\b(given)\\b\\s*([_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`)?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"entity.name.given.declaration"}}}]},"char-literal":{"end":"'|$","begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.character.begin.scala"}},"patterns":[{"match":"\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})","name":"constant.character.escape.scala"},{"match":"\\\\.","name":"invalid.illegal.unrecognized-character-escape.scala"},{"match":"[^']{2,}","name":"invalid.illegal.character-literal-too-long"},{"match":"(?'(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))(?!')","name":"constant.other.symbol.scala"},"curly-braces":{"begin":"\\{","end":"\\}","beginCaptures":{"0":{"name":"punctuation.section.block.begin.scala"}},"endCaptures":{"0":{"name":"punctuation.section.block.end.scala"}},"patterns":[{"include":"#code"}]},"meta-brackets":{"patterns":[{"match":"\\{","comment":"The punctuation.section.*.begin is needed for return snippet in source bundle","name":"punctuation.section.block.begin.scala"},{"match":"\\}","comment":"The punctuation.section.*.end is needed for return snippet in source bundle","name":"punctuation.section.block.end.scala"},{"match":"{|}|\\(|\\)|\\[|\\]","name":"meta.bracket.scala"}],"comment":"For themes: Brackets look nice when colored."},"qualifiedClassName":{"match":"(\\b([A-Z][\\w]*)(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)","captures":{"1":{"name":"entity.name.class"}}},"backQuotedVariable":{"match":"`[^`]+`"},"storage-modifiers":{"patterns":[{"match":"\\b(private\\[\\S+\\]|protected\\[\\S+\\]|private|protected)\\b","name":"storage.modifier.access"},{"match":"\\b(synchronized|@volatile|abstract|final|lazy|sealed|implicit|override|@transient|@native)\\b","name":"storage.modifier.other"},{"match":"(?<=^|\\s)\\b(transparent|opaque|infix|open|inline)\\b(?=[a-z\\s]*\\b(def|val|var|given|type|class|trait|object|enum)\\b)","name":"storage.modifier.other"}]},"meta-bounds":{"match":"<%|=:=|<:<|<%<|>:|<:","comment":"For themes: Matching view bounds","name":"meta.bounds.scala"},"using-directive":{"end":"\\n","begin":"^\\s*(//>)\\s*(using)[^\\S\\n]+","beginCaptures":{"1":{"name":"punctuation.definition.comment.scala"},"2":{"name":"keyword.other.import.scala"}},"patterns":[{"match":"[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)","name":"entity.name.import.scala"},{"match":"\\.","name":"punctuation.definition.import"},{"include":"#strings"},{"include":"#constants"}],"name":"comment.line.shebang.scala"},"comments":{"patterns":[{"include":"#block-comments"},{"end":"(?!\\G)","begin":"(^[ \\t]+)?(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.scala"}},"patterns":[{"end":"\\n","begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.scala"}},"name":"comment.line.double-slash.scala"}]}]},"block-comments":{"patterns":[{"match":"/\\*\\*/","captures":{"0":{"name":"punctuation.definition.comment.scala"}},"name":"comment.block.empty.scala"},{"end":"\\*/","begin":"^\\s*(/\\*\\*)(?!/)","beginCaptures":{"1":{"name":"punctuation.definition.comment.scala"}},"patterns":[{"match":"(@param)\\s+(\\S+)","captures":{"1":{"name":"keyword.other.documentation.scaladoc.scala"},"2":{"name":"variable.parameter.scala"}}},{"match":"(@(?:tparam|throws))\\s+(\\S+)","captures":{"1":{"name":"keyword.other.documentation.scaladoc.scala"},"2":{"name":"entity.name.class"}}},{"match":"@(return|see|note|example|constructor|usecase|author|version|since|todo|deprecated|migration|define|inheritdoc)\\b","name":"keyword.other.documentation.scaladoc.scala"},{"match":"(\\[\\[)([^\\]]+)(\\]\\])","captures":{"1":{"name":"punctuation.definition.documentation.link.scala"},"2":{"name":"string.other.link.title.markdown"},"3":{"name":"punctuation.definition.documentation.link.scala"}}},{"include":"#block-comments"}],"endCaptures":{"0":{"name":"punctuation.definition.comment.scala"}},"name":"comment.block.documentation.scala"},{"end":"\\*/","begin":"/\\*","captures":{"0":{"name":"punctuation.definition.comment.scala"}},"patterns":[{"include":"#block-comments"}],"name":"comment.block.scala"}]},"xml-embedded-content":{"patterns":[{"end":"}","begin":"{","patterns":[{"include":"#code"}],"captures":{"0":{"name":"meta.bracket.scala"}},"name":"meta.source.embedded.scala"},{"match":" (?:([-_a-zA-Z0-9]+)((:)))?([_a-zA-Z-]+)=","captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}}},{"include":"#xml-doublequotedString"},{"include":"#xml-singlequotedString"}]},"inheritance":{"patterns":[{"match":"\\b(extends|with|derives)\\b\\s*([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`|(?=\\([^\\)]+=>)|(?=(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))|(?=\"))?","captures":{"1":{"name":"keyword.declaration.scala"},"2":{"name":"entity.name.class"}}}]},"extension":{"patterns":[{"match":"^\\s*(extension)\\s+(?=[\\[\\(])","captures":{"1":{"name":"keyword.declaration.scala"}}}]},"parameter-list":{"patterns":[{"match":"(?<=[^\\._$a-zA-Z0-9])(`[^`]+`|[_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)\\s*(:)\\s+","captures":{"1":{"name":"variable.parameter.scala"},"2":{"name":"meta.colon.scala"}}}]},"xml-literal":{"patterns":[{"end":"(>(<))/(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]*[_a-zA-Z0-9])(>)","begin":"(<)((?:([_a-zA-Z0-9][_a-zA-Z0-9]*)((:)))?([_a-zA-Z0-9][-_a-zA-Z0-9:]*))(?=(\\s[^>]*)?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"entity.name.tag.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"}},"patterns":[{"include":"#xml-embedded-content"}],"comment":"We do not allow a tag name to start with a - since this would likely conflict with the <- operator. This is not very common for tag names anyway. Also code such as -- if (val val3) will falsly be recognized as an xml tag. The solution is to put a space on either side of the comparison operator","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"meta.scope.between-tag-pair.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"entity.name.tag.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml"},{"end":"(/?>)","begin":"(]*?>)","patterns":[{"include":"#xml-embedded-content"}],"captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"name":"meta.tag.xml"},{"include":"#xml-entity"}]}},"uuid":"158C0929-299A-40C8-8D89-316BE0C446E8","patterns":[{"include":"#code"}],"name":"Scala","scopeName":"source.scala"} diff --git a/tests/snap/backticks.test.scala.snap b/tests/snap/backticks.test.scala.snap index 2d6813e..95560b2 100644 --- a/tests/snap/backticks.test.scala.snap +++ b/tests/snap/backticks.test.scala.snap @@ -9,7 +9,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -21,7 +21,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -33,7 +33,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -64,7 +64,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^^ source.scala variable.other.declaration.scala +# ^^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala diff --git a/tests/snap/comments.test.scala.snap b/tests/snap/comments.test.scala.snap index 12b9ec0..d591cf0 100644 --- a/tests/snap/comments.test.scala.snap +++ b/tests/snap/comments.test.scala.snap @@ -96,7 +96,7 @@ # ^ source.scala meta.bracket.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala keyword.operator.scala # ^ source.scala # ^^^ source.scala entity.name.class diff --git a/tests/snap/end.test.scala.snap b/tests/snap/end.test.scala.snap index 9106e40..3934390 100644 --- a/tests/snap/end.test.scala.snap +++ b/tests/snap/end.test.scala.snap @@ -54,7 +54,7 @@ #^^^^^^^^^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^^ source.scala keyword.operator.scala # ^^^ source.scala @@ -70,7 +70,7 @@ #^^^^^^^^^^^^ source.scala # ^^^ source.scala keyword.declaration.volatile.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.volatile.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala > x diff --git a/tests/snap/lexical.test.scala.snap b/tests/snap/lexical.test.scala.snap index e7bbaf6..a765d0d 100644 --- a/tests/snap/lexical.test.scala.snap +++ b/tests/snap/lexical.test.scala.snap @@ -9,7 +9,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -18,7 +18,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^^^ source.scala variable.other.declaration.scala +# ^^^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -28,7 +28,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^^^^^ source.scala variable.other.declaration.scala +# ^^^^^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -38,7 +38,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^ source.scala variable.other.declaration.scala +# ^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -48,7 +48,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^^^^ source.scala variable.other.declaration.scala +# ^^^^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -57,7 +57,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -67,7 +67,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^^^^ source.scala variable.other.declaration.scala +# ^^^^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -77,7 +77,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^^ source.scala variable.other.declaration.scala +# ^^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -87,7 +87,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^ source.scala variable.other.declaration.scala +# ^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -97,7 +97,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^^^^^^^^^^ source.scala variable.other.declaration.scala +# ^^^^^^^^^^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -106,7 +106,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^^^^^ source.scala variable.other.declaration.scala +# ^^^^^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -116,7 +116,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^^^^^^ source.scala variable.other.declaration.scala +# ^^^^^^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -262,7 +262,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^^^^^^^^^^^^ source.scala variable.other.declaration.scala +# ^^^^^^^^^^^^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -293,7 +293,7 @@ # ^^ source.scala meta.template.expression.scala punctuation.definition.template-expression.begin.scala # ^^^ source.scala meta.template.expression.scala meta.embedded.line.scala keyword.declaration.stable.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala -# ^ source.scala meta.template.expression.scala meta.embedded.line.scala variable.other.declaration.scala +# ^ source.scala meta.template.expression.scala meta.embedded.line.scala variable.stable.declaration.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala keyword.operator.comparison.scala # ^^ source.scala meta.template.expression.scala meta.embedded.line.scala @@ -315,7 +315,7 @@ # ^^ source.scala meta.template.expression.scala punctuation.definition.template-expression.begin.scala # ^^^ source.scala meta.template.expression.scala meta.embedded.line.scala keyword.declaration.stable.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala -# ^ source.scala meta.template.expression.scala meta.embedded.line.scala variable.other.declaration.scala +# ^ source.scala meta.template.expression.scala meta.embedded.line.scala variable.stable.declaration.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala keyword.operator.comparison.scala # ^^ source.scala meta.template.expression.scala meta.embedded.line.scala @@ -338,7 +338,7 @@ # ^^ source.scala meta.template.expression.scala punctuation.definition.template-expression.begin.scala # ^^^ source.scala meta.template.expression.scala meta.embedded.line.scala keyword.declaration.stable.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala -# ^ source.scala meta.template.expression.scala meta.embedded.line.scala variable.other.declaration.scala +# ^ source.scala meta.template.expression.scala meta.embedded.line.scala variable.stable.declaration.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala keyword.operator.comparison.scala # ^^ source.scala meta.template.expression.scala meta.embedded.line.scala @@ -360,7 +360,7 @@ # ^^ source.scala meta.template.expression.scala punctuation.definition.template-expression.begin.scala # ^^^ source.scala meta.template.expression.scala meta.embedded.line.scala keyword.declaration.stable.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala -# ^ source.scala meta.template.expression.scala meta.embedded.line.scala variable.other.declaration.scala +# ^ source.scala meta.template.expression.scala meta.embedded.line.scala variable.stable.declaration.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala # ^ source.scala meta.template.expression.scala meta.embedded.line.scala keyword.operator.comparison.scala # ^^ source.scala meta.template.expression.scala meta.embedded.line.scala @@ -436,7 +436,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala diff --git a/tests/snap/scala_spec.test.scala.snap b/tests/snap/scala_spec.test.scala.snap index 037b3e4..0ef87d2 100644 --- a/tests/snap/scala_spec.test.scala.snap +++ b/tests/snap/scala_spec.test.scala.snap @@ -124,7 +124,7 @@ # ^ source.scala meta.bracket.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^ source.scala variable.other.declaration.scala +# ^^^^ source.scala variable.stable.declaration.scala # ^ source.scala keyword.operator.scala # ^ source.scala # ^^^^^^ source.scala entity.name.class @@ -419,7 +419,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.scala # ^ source.scala @@ -494,7 +494,7 @@ # ^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala keyword.operator.scala # ^ source.scala # ^^^^^ source.scala entity.name.class @@ -712,7 +712,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.volatile.scala # ^ source.scala -# ^^^^^^ source.scala variable.other.declaration.scala +# ^^^^^^ source.scala variable.volatile.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -925,7 +925,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^ source.scala variable.other.declaration.scala +# ^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -934,7 +934,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^ source.scala variable.other.declaration.scala +# ^^ source.scala variable.stable.declaration.scala # ^ source.scala keyword.operator.scala # ^ source.scala # ^^^^^^ source.scala entity.name.class @@ -964,7 +964,7 @@ #^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^^ source.scala keyword.operator.scala # ^^^^ source.scala @@ -1025,7 +1025,7 @@ # ^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^^^ source.scala @@ -1043,7 +1043,7 @@ # ^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -1069,7 +1069,7 @@ # ^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -1128,7 +1128,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^^ source.scala variable.other.declaration.scala +# ^^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -1170,7 +1170,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.volatile.scala # ^ source.scala -# ^^^^ source.scala variable.other.declaration.scala +# ^^^^ source.scala variable.volatile.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -1179,7 +1179,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.volatile.scala # ^ source.scala -# ^^^^ source.scala variable.other.declaration.scala +# ^^^^ source.scala variable.volatile.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -1484,7 +1484,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.scala # ^ source.scala @@ -1499,7 +1499,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.scala # ^ source.scala @@ -1516,7 +1516,7 @@ #^^^^^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -1561,7 +1561,7 @@ #^^^^^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^ source.scala variable.other.declaration.scala +# ^^^ source.scala variable.stable.declaration.scala # ^ source.scala keyword.operator.scala # ^ source.scala # ^^^^^ source.scala entity.name.class @@ -1588,7 +1588,7 @@ #^^^^^^^^ source.scala # ^^^ source.scala keyword.declaration.volatile.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.volatile.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -1608,7 +1608,7 @@ #^^^^^^^^^^ source.scala # ^^^ source.scala keyword.declaration.volatile.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.volatile.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -1632,7 +1632,7 @@ #^^^^^^^^^^^^ source.scala # ^^^ source.scala keyword.declaration.volatile.scala # ^ source.scala -# ^^^ source.scala variable.other.declaration.scala +# ^^^ source.scala variable.volatile.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -1641,7 +1641,7 @@ #^^^^^^^^^^^^ source.scala # ^^^ source.scala keyword.declaration.volatile.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.volatile.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -1938,7 +1938,7 @@ #^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^^^^ source.scala variable.other.declaration.scala +# ^^^^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -2323,7 +2323,7 @@ #^^^^^^ source.scala # ^^^ source.scala keyword.declaration.stable.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.stable.declaration.scala # ^ source.scala # ^ source.scala keyword.operator.comparison.scala # ^ source.scala @@ -2430,7 +2430,7 @@ # ^^^^^^^^^ source.scala # ^^^ source.scala keyword.declaration.volatile.scala # ^ source.scala -# ^ source.scala variable.other.declaration.scala +# ^ source.scala variable.volatile.declaration.scala # ^ source.scala keyword.operator.scala # ^ source.scala # ^^^ source.scala entity.name.class diff --git a/tests/unit/#157.test.scala b/tests/unit/#157.test.scala index 51b1de4..9652552 100644 --- a/tests/unit/#157.test.scala +++ b/tests/unit/#157.test.scala @@ -2,22 +2,22 @@ val Foo = ??? // ^^^ keyword.declaration.stable.scala -// ^^^ variable.other.declaration.scala +// ^^^ variable.stable.declaration.scala val foo = ??? // ^^^ keyword.declaration.stable.scala -// ^^^ variable.other.declaration.scala +// ^^^ variable.stable.declaration.scala var Foo = ??? // ^^^ keyword.declaration.volatile.scala -// ^^^ variable.other.declaration.scala +// ^^^ variable.volatile.declaration.scala var foo = ??? // ^^^ keyword.declaration.volatile.scala -// ^^^ variable.other.declaration.scala +// ^^^ variable.volatile.declaration.scala def Foo = ??? // ^^^ entity.name.function.declaration - def foo + def foo // ^^^ entity.name.function.declaration diff --git a/tests/unit/#234.test.scala b/tests/unit/#234.test.scala new file mode 100644 index 0000000..d21b728 --- /dev/null +++ b/tests/unit/#234.test.scala @@ -0,0 +1,24 @@ +// SYNTAX TEST "source.scala" + + val foo = Value +// ^^^ variable.stable.declaration.scala + + val Mon = Value +// ^^^ variable.stable.declaration.scala + + val Mon, Tue = Value +// ^^^ variable.stable.declaration.scala +// ^^^ variable.stable.declaration.scala + + val Mon, Tue, Wed = Value +// ^^^ variable.stable.declaration.scala +// ^^^ variable.stable.declaration.scala +// ^^^ variable.stable.declaration.scala + + var Mon = Value +// ^^^ variable.volatile.declaration.scala + + var Mon, Tue, Wed = Value +// ^^^ variable.volatile.declaration.scala +// ^^^ variable.volatile.declaration.scala +// ^^^ variable.volatile.declaration.scala diff --git a/tests/unit/#72.test.scala b/tests/unit/#72.test.scala index 88695b6..9431f0c 100644 --- a/tests/unit/#72.test.scala +++ b/tests/unit/#72.test.scala @@ -30,7 +30,7 @@ val a = 4; foo(a) // ^^^ keyword.declaration.stable.scala -// ^ variable.other.declaration.scala +// ^ variable.stable.declaration.scala // ^ keyword.operator.comparison.scala // ^ constant.numeric.scala s"$safeTagMarker${val a = 4; foo(a)}$safeTagMarker" @@ -38,6 +38,6 @@ // ^^^^^^^^^^^^^^^^^ meta.embedded.line.scala // ^^^^^^^^^^^^^^^^^ - punctuation.definition.template-expression // ^^^ keyword.declaration.stable.scala -// ^ variable.other.declaration.scala +// ^ variable.stable.declaration.scala // ^ keyword.operator.comparison.scala // ^ constant.numeric.scala diff --git a/tests/unit/basic.test.scala b/tests/unit/basic.test.scala index 1098532..0f3da8b 100644 --- a/tests/unit/basic.test.scala +++ b/tests/unit/basic.test.scala @@ -12,7 +12,7 @@ class Stack[A] { private var elements: List[A] = Nil //^^^^^^^ storage.modifier.access // ^^^ keyword.declaration.volatile.scala -// ^^^^^^^^ variable.other.declaration.scala +// ^^^^^^^^ variable.volatile.declaration.scala // ^ keyword.operator.scala // ^^^^ entity.name.class // ^ meta.bracket.scala @@ -39,7 +39,7 @@ class Stack[A] { def pop(): A = { val currentTop = peek // ^^^ keyword.declaration.stable.scala -// ^^^^^^^^^^ variable.other.declaration.scala +// ^^^^^^^^^^ variable.stable.declaration.scala // ^ keyword.operator.comparison.scala // ^^^^ source.scala elements = elements.tail diff --git a/tests/unit/enum.test.scala b/tests/unit/enum.test.scala index 15882d7..8647497 100644 --- a/tests/unit/enum.test.scala +++ b/tests/unit/enum.test.scala @@ -13,7 +13,7 @@ // ^^^^ keyword.declaration.scala // ^^^^^^^ entity.name.class.declaration // ^^^ keyword.declaration.stable.scala -// ^^^^^^^^^^^^^^ variable.other.declaration.scala +// ^^^^^^^^^^^^^^ variable.stable.declaration.scala // ^^^ entity.name.class case Unicycle extends Vehicle(1) // ^^^^ source.scala keyword.control.flow.scala @@ -23,7 +23,7 @@ // ^ meta.bracket.scala // ^ constant.numeric.scala // ^ meta.bracket.scala - + case Bicycle extends Vehicle(2) // ^^^^ source.scala keyword.control.flow.scala // ^^^^^^^ entity.name.class diff --git a/tests/unit/lexical.test.scala b/tests/unit/lexical.test.scala index 5f927b8..818c9d2 100644 --- a/tests/unit/lexical.test.scala +++ b/tests/unit/lexical.test.scala @@ -1,33 +1,33 @@ -// SYNTAX TEST "source.scala" +// SYNTAX TEST "source.scala" object ExampleIdentifiers { val x = 3 -// ^ variable.other.declaration.scala - val Object = 3 +// ^ variable.stable.declaration.scala + val Object = 3 val maxIndex = 3 -// ^^^^^^^^ variable.other.declaration.scala - val p2p = 3 -// ^^^ variable.other.declaration.scala +// ^^^^^^^^ variable.stable.declaration.scala + val p2p = 3 +// ^^^ variable.stable.declaration.scala val empty_? = 3 -// ^^^^^^^ variable.other.declaration.scala - val + = 3 -// ^ variable.other.declaration.scala - val `yield` = 3 -// ^^^^^^^ variable.other.declaration.scala - val αρετη = 3 - val _y = 3 -// ^^ variable.other.declaration.scala +// ^^^^^^^ variable.stable.declaration.scala + val + = 3 +// ^ variable.stable.declaration.scala + val `yield` = 3 +// ^^^^^^^ variable.stable.declaration.scala + val αρετη = 3 + val _y = 3 +// ^^ variable.stable.declaration.scala val dot_product_* = 3 -// ^^^^^^^^^^^^^ variable.other.declaration.scala - val __system = 3 -// ^^^^^^^^ variable.other.declaration.scala +// ^^^^^^^^^^^^^ variable.stable.declaration.scala + val __system = 3 +// ^^^^^^^^ variable.stable.declaration.scala val _MAX_LEN_ = 3 -// ^^^^^^^^^ variable.other.declaration.scala +// ^^^^^^^^^ variable.stable.declaration.scala } object IntegerLiterals { (0, 21, 0xFFFFFFFF, -42L) -// ^ constant.numeric.scala +// ^ constant.numeric.scala // ^^ constant.numeric.scala // ^^^^^^^^^^ constant.numeric.scala // ^ keyword.operator.arithmetic.scala @@ -37,9 +37,9 @@ object IntegerLiterals { object FloatingPointLiterals { ( 0.0, 1e30f, 3.14159f, 1.0e-100, .1 ) // ^^^ constant.numeric.scala -// ^^^^^^^^ constant.numeric.scala -// ^^^^^^^^ constant.numeric.scala -// ^^ constant.numeric.scala +// ^^^^^^^^ constant.numeric.scala +// ^^^^^^^^ constant.numeric.scala +// ^^ constant.numeric.scala } object Boolean { @@ -54,9 +54,9 @@ object CharacterLiterals { // ^^^ constant.character.literal.scala // ^ punctuation.definition.character.end.scala // ^^^^^^^^ constant.character.literal.scala -// ^^^^^^ constant.character.escape.scala +// ^^^^^^ constant.character.escape.scala // ^^ constant.character.escape.scala -// ^^ constant.character.escape.scala +// ^^ constant.character.escape.scala } object StringLiterals { @@ -65,14 +65,14 @@ object StringLiterals { // ^^^^^^^^^^^^^^^^ string.quoted.double.scala // ^^ constant.character.escape.scala // ^ punctuation.definition.string.end.scala -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double.scala +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double.scala """the present string // ^^^ punctuation.definition.string.begin.scala // ^^^^^^^^^^^^^^^^^^^^^ string.quoted.triple.scala spans three // ^^^^^^^^^^^ string.quoted.triple.scala lines.""" -// ^^^^^^^^^ string.quoted.triple.scala +// ^^^^^^^^^ string.quoted.triple.scala // ^^^ punctuation.definition.string.end.scala """the present string @@ -86,8 +86,8 @@ object StringLiterals { s"$x plain ${val x = y}" //^ keyword.interpolation.scala -// ^ punctuation.definition.string.begin.scala -// ^ punctuation.definition.template-expression.begin.scala +// ^ punctuation.definition.string.begin.scala +// ^ punctuation.definition.template-expression.begin.scala // ^ - string.quoted.double.interpolated.scala string.quoted.double.scala // ^^^^^^^ string.quoted.double.interpolated.scala // ^^^^^^^^^^^^ meta.template.expression.scala @@ -96,12 +96,12 @@ object StringLiterals { // ^^^ keyword.declaration.stable.scala // ^^^^^^^^^ - string.quoted.double.interpolated.scala string.quoted.double.scala // ^ punctuation.definition.template-expression.end.scala -// ^ string.quoted.double.interpolated.scala punctuation.definition.string.end.scala +// ^ string.quoted.double.interpolated.scala punctuation.definition.string.end.scala custom"$x plain ${val x = y}" //^^^^^^ keyword.interpolation.scala -// ^ punctuation.definition.string.begin.scala -// ^ punctuation.definition.template-expression.begin.scala +// ^ punctuation.definition.string.begin.scala +// ^ punctuation.definition.template-expression.begin.scala // ^ - string.quoted.double.interpolated.scala string.quoted.double.scala // ^^^^^^^ string.quoted.double.interpolated.scala // ^^^^^^^^^^^^ meta.template.expression.scala @@ -110,18 +110,18 @@ object StringLiterals { // ^^^ keyword.declaration.stable.scala // ^^^^^^^^^ - string.quoted.double.interpolated.scala string.quoted.double.scala // ^ punctuation.definition.template-expression.end.scala -// ^ string.quoted.double.interpolated.scala punctuation.definition.string.end.scala +// ^ string.quoted.double.interpolated.scala punctuation.definition.string.end.scala object Symbols { ('x, 'X, 'αρετη, '=, '+ ) // ^^ constant.other.symbol.scala // ^^ constant.other.symbol.scala -// ^^^^^^ constant.other.symbol.scala +// ^^^^^^ constant.other.symbol.scala } // single line comment -// ^^ punctuation.definition.comment.scala -// ^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash.scala +// ^^ punctuation.definition.comment.scala +// ^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash.scala /* // ^^ punctuation.definition.comment.scala @@ -129,7 +129,7 @@ object Symbols { // ^^^^^^^^^^^^^^^^^^^ comment.block.scala /** * Scaladoc comment - * @scaladoc @param + * @scaladoc @param */ /* nested /* multi-line */ comment */ diff --git a/tests/unit/unicode.identifiers.test.scala b/tests/unit/unicode.identifiers.test.scala index 542b59a..dad2ab8 100644 --- a/tests/unit/unicode.identifiers.test.scala +++ b/tests/unit/unicode.identifiers.test.scala @@ -1,6 +1,6 @@ // SYNTAX TEST "source.scala" -class Φδφκξ(x : Int, δφξκξ: Int, val y: Int, val φξ: Int) { +class Φδφκξ(x : Int, δφξκξ: Int, val y: Int, val φξ: Int) { // <----- keyword.declaration.scala // ^^^^^ entity.name.class.declaration // ^ meta.bracket.scala @@ -11,11 +11,11 @@ class Φδφκξ(x : Int, δφξκξ: Int, val y: Int, val φξ: Int) { // ^ meta.colon.scala // ^^^ entity.name.class // ^^^ keyword.declaration.stable.scala -// ^ variable.other.declaration.scala +// ^ variable.stable.declaration.scala // ^ keyword.operator.scala // ^^^ entity.name.class // ^^^ keyword.declaration.stable.scala -// ^^ variable.other.declaration.scala +// ^^ variable.stable.declaration.scala // ^ keyword.operator.scala // ^^^ entity.name.class // ^ meta.bracket.scala @@ -27,11 +27,11 @@ class Φδφκξ(x : Int, δφξκξ: Int, val y: Int, val φξ: Int) { // ^ keyword.operator.comparison.scala val δφξ = 4 //^^^ keyword.declaration.stable.scala -// ^^^ variable.other.declaration.scala +// ^^^ variable.stable.declaration.scala // ^ keyword.operator.comparison.scala var δφξ = 5 //^^^ keyword.declaration.volatile.scala -// ^^^ variable.other.declaration.scala +// ^^^ variable.volatile.declaration.scala // ^ keyword.operator.comparison.scala def δφξ(δφξκξ: Int) = () //^^^ keyword.declaration.scala @@ -56,13 +56,13 @@ class Φδφκξ(x : Int, δφξκξ: Int, val y: Int, val φξ: Int) { val Constant = 3 //^^^ keyword.declaration.stable.scala -// ^^^^^^^^ variable.other.declaration.scala +// ^^^^^^^^ variable.stable.declaration.scala // ^ keyword.operator.comparison.scala val Константа = 4 //^^^ keyword.declaration.stable.scala -// ^^^^^^^^^ variable.other.declaration.scala +// ^^^^^^^^^ variable.stable.declaration.scala // ^ keyword.operator.comparison.scala - + }