diff --git a/src/typescript/Scala.tmLanguage.ts b/src/typescript/Scala.tmLanguage.ts index c130cdd..e6d8829 100644 --- a/src/typescript/Scala.tmLanguage.ts +++ b/src/typescript/Scala.tmLanguage.ts @@ -226,6 +226,9 @@ export const scalaTmLanguage: TmLanguage = { }, code: { patterns: [ + { + include: '#using-directive' + }, { include: '#script-header' }, @@ -960,6 +963,35 @@ export const scalaTmLanguage: TmLanguage = { 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: `${idUpper}|${backQuotedId}|${plainid}`, + name: 'entity.name.import.scala' + }, + { + match: '\\.', + name: 'punctuation.definition.import' + }, + { + include: '#strings' + }, + { + include: '#constants' + }, + ], + name: 'comment.line.shebang.scala' + }, comments: { patterns: [ { diff --git a/syntaxes/Scala.tmLanguage.json b/syntaxes/Scala.tmLanguage.json index ae4496a..f9c1838 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+(given\\s+)?","beginCaptures":{"1":{"name":"keyword.other.export.scala"},"2":{"name":"keyword.other.export.given.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.export.scala"},{"match":"\\.","name":"punctuation.definition.export"},{"end":"}","begin":"{","beginCaptures":{"0":{"name":"meta.bracket.scala"}},"patterns":[{"match":"(?x)\\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}]+))\\s*","captures":{"1":{"name":"entity.name.export.renamed-from.scala"},"2":{"name":"keyword.other.arrow.scala"},"3":{"name":"entity.name.export.renamed-to.scala"}}},{"match":"([^\\s.,}]+)","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":"#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"},"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.other.inherited-class.scala"}}}]},"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+(given\\s+)?","beginCaptures":{"1":{"name":"keyword.other.export.scala"},"2":{"name":"keyword.other.export.given.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.export.scala"},{"match":"\\.","name":"punctuation.definition.export"},{"end":"}","begin":"{","beginCaptures":{"0":{"name":"meta.bracket.scala"}},"patterns":[{"match":"(?x)\\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}]+))\\s*","captures":{"1":{"name":"entity.name.export.renamed-from.scala"},"2":{"name":"keyword.other.arrow.scala"},"3":{"name":"entity.name.export.renamed-to.scala"}}},{"match":"([^\\s.,}]+)","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.other.inherited-class.scala"}}}]},"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/comments.test.scala b/tests/snap/comments.test.scala index 1ea922b..f961367 100644 --- a/tests/snap/comments.test.scala +++ b/tests/snap/comments.test.scala @@ -1,7 +1,13 @@ /// SYNTAX TEST "source.scala" #!/usr/bin/env scala -// single line comments +//> using packaging.version "1.0.0" +//> using scala 2.13 +// > using this.is comment +// //> using comment "out" + +//> using +object X /* /**/ /** */ /* comments within comments */ */ @@ -138,4 +144,4 @@ object Markup { * 1. Third item */ def lists = () -} \ No newline at end of file +} diff --git a/tests/snap/comments.test.scala.snap b/tests/snap/comments.test.scala.snap index 7511be2..12b9ec0 100644 --- a/tests/snap/comments.test.scala.snap +++ b/tests/snap/comments.test.scala.snap @@ -5,9 +5,40 @@ #^^ source.scala comment.block.shebang.scala # ^^^^^^^^^^^^^^^^^^ source.scala comment.block.shebang.scala string.unquoted.shebang.scala > ->// single line comments +>//> using packaging.version "1.0.0" +#^^^ source.scala comment.line.shebang.scala punctuation.definition.comment.scala +# ^ source.scala comment.line.shebang.scala +# ^^^^^ source.scala comment.line.shebang.scala keyword.other.import.scala +# ^ source.scala comment.line.shebang.scala +# ^^^^^^^^^ source.scala comment.line.shebang.scala entity.name.import.scala +# ^ source.scala comment.line.shebang.scala punctuation.definition.import +# ^^^^^^^ source.scala comment.line.shebang.scala entity.name.import.scala +# ^ source.scala comment.line.shebang.scala +# ^ source.scala comment.line.shebang.scala string.quoted.double.scala punctuation.definition.string.begin.scala +# ^^^^^ source.scala comment.line.shebang.scala string.quoted.double.scala +# ^ source.scala comment.line.shebang.scala string.quoted.double.scala punctuation.definition.string.end.scala +>//> using scala 2.13 +#^^^ source.scala comment.line.shebang.scala punctuation.definition.comment.scala +# ^ source.scala comment.line.shebang.scala +# ^^^^^ source.scala comment.line.shebang.scala keyword.other.import.scala +# ^ source.scala comment.line.shebang.scala +# ^^^^^ source.scala comment.line.shebang.scala entity.name.import.scala +# ^ source.scala comment.line.shebang.scala +# ^^^^ source.scala comment.line.shebang.scala constant.numeric.scala +>// > using this.is comment #^^ source.scala comment.line.double-slash.scala punctuation.definition.comment.scala -# ^^^^^^^^^^^^^^^^^^^^^ source.scala comment.line.double-slash.scala +# ^^^^^^^^^^^^^^^^^^^^^^^^ source.scala comment.line.double-slash.scala +>// //> using comment "out" +#^^ source.scala comment.line.double-slash.scala punctuation.definition.comment.scala +# ^^^^^^^^^^^^^^^^^^^^^^^^ source.scala comment.line.double-slash.scala +> +>//> using +#^^ source.scala comment.line.double-slash.scala punctuation.definition.comment.scala +# ^^^^^^^ source.scala comment.line.double-slash.scala +>object X +#^^^^^^ source.scala keyword.declaration.scala +# ^ source.scala +# ^ source.scala entity.name.class.declaration > >/* /**/ /** */ /* comments within comments */ */ #^^ source.scala comment.block.scala punctuation.definition.comment.scala @@ -521,4 +552,5 @@ # ^ source.scala # ^^ source.scala meta.parentheses.scala meta.bracket.scala >} -#^ source.scala punctuation.section.block.end.scala \ No newline at end of file +#^ source.scala punctuation.section.block.end.scala +> \ No newline at end of file diff --git a/tests/snap/end.test.scala.snap b/tests/snap/end.test.scala.snap index 6819e64..9106e40 100644 --- a/tests/snap/end.test.scala.snap +++ b/tests/snap/end.test.scala.snap @@ -250,4 +250,4 @@ #^^^ source.scala keyword.declaration.end.scala # ^ source.scala # ^^ source.scala entity.name.declaration -> +> \ No newline at end of file