mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Extend the design's keyword list with the keywords from all the approved proposals to date. Update our four syntax highlighters to have matching keyword lists. There are a few other stale things in some of the syntax highlighters; those are not fixed here. Assisted-by: Claude via Antigravity
1056 lines
27 KiB
Plaintext
1056 lines
27 KiB
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
Exceptions. See /LICENSE for license information.
|
|
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
-->
|
|
|
|
<!--
|
|
THIS FILE IS AUTOGENERATED FROM carbon.tmLanguage.json. DO NOT EDIT.
|
|
-->
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>$schema</key>
|
|
<string>https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json</string>
|
|
<key>fileTypes</key>
|
|
<array>
|
|
<string>carbon</string>
|
|
</array>
|
|
<key>foldingStartMarker</key>
|
|
<string>\{\s*$</string>
|
|
<key>foldingStopMarker</key>
|
|
<string>^\s*\}</string>
|
|
<key>name</key>
|
|
<string>carbon</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#comments</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#cpp-inline</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#strings</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#declarations</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#keywords</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#literals</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#numbers</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#operators</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#identifiers</string>
|
|
</dict>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#punctuation</string>
|
|
</dict>
|
|
</array>
|
|
<key>repository</key>
|
|
<dict>
|
|
<key>comments</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>captures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.comment.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>keyword.other.directive.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Toolchain directives, which are comments the driver acts on.</string>
|
|
<key>match</key>
|
|
<string>(//)(@(?:dump-sem-ir-(?:begin|end)|include-in-dumps))\b.*$</string>
|
|
<key>name</key>
|
|
<string>comment.line.double-slash.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>captures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.comment.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>match</key>
|
|
<string>(//).*$</string>
|
|
<key>name</key>
|
|
<string>comment.line.double-slash.carbon</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>cpp-inline</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>\b(?:(import)\s+(Cpp)\s+(inline)|(inline)\s+(Cpp))\s*(''')([^\s'\"#]*)</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>support.class.carbon</string>
|
|
</dict>
|
|
<key>3</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<key>4</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<key>5</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>support.class.carbon</string>
|
|
</dict>
|
|
<key>6</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>7</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>entity.name.tag.language.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Inline C++, block form.</string>
|
|
<key>contentName</key>
|
|
<string>meta.embedded.block.cpp</string>
|
|
<key>end</key>
|
|
<string>(''')\s*(;)?</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.terminator.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>source.cpp</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>\b(?:(import)\s+(Cpp)\s+(inline)|(inline)\s+(Cpp))\s*(")</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>support.class.carbon</string>
|
|
</dict>
|
|
<key>3</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<key>4</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<key>5</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>support.class.carbon</string>
|
|
</dict>
|
|
<key>6</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Inline C++, single-line form.</string>
|
|
<key>contentName</key>
|
|
<string>meta.embedded.inline.cpp</string>
|
|
<key>end</key>
|
|
<string>(")\s*(;)?</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.terminator.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>source.cpp</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>declarations</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>captures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>entity.name.function.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Function declarations, including lambdas with a name. `destroy` is a keyword naming a destructor, not a name.</string>
|
|
<key>match</key>
|
|
<string>\b(fn)\s+(?!destroy\b)((?:r#)?[A-Za-z_][A-Za-z0-9_]*)</string>
|
|
</dict>
|
|
<dict>
|
|
<key>captures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>entity.name.type.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Nominal type declarations.</string>
|
|
<key>match</key>
|
|
<string>\b(alias|choice|class|constraint|interface)\s+((?:r#)?[A-Za-z_][A-Za-z0-9_]*)</string>
|
|
</dict>
|
|
<dict>
|
|
<key>captures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>entity.name.namespace.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Package, namespace, and import names. `library` and `inline` are keywords that may follow `import`, not names.</string>
|
|
<key>match</key>
|
|
<string>\b(package|namespace|import)\s+(?!(?:library|inline)\b)((?:r#)?[A-Za-z_][A-Za-z0-9_]*)</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>identifiers</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>captures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.raw-identifier.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>entity.name.type.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Raw identifiers, which suppress keyword meaning.</string>
|
|
<key>match</key>
|
|
<string>\b(r#)([A-Z][A-Za-z0-9_]*)</string>
|
|
</dict>
|
|
<dict>
|
|
<key>captures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.raw-identifier.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>variable.other.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>match</key>
|
|
<string>\b(r#)([a-z_][A-Za-z0-9_]*)</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>An identifier applied to an argument list is a call.</string>
|
|
<key>match</key>
|
|
<string>\b[A-Za-z_][A-Za-z0-9_]*(?=\s*\()</string>
|
|
<key>name</key>
|
|
<string>entity.name.function.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>UpperCamel names a type.</string>
|
|
<key>match</key>
|
|
<string>\b[A-Z][A-Za-z0-9_]*\b</string>
|
|
<key>name</key>
|
|
<string>entity.name.type.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>lower_snake names a value.</string>
|
|
<key>match</key>
|
|
<string>\b[a-z_][A-Za-z0-9_]*\b</string>
|
|
<key>name</key>
|
|
<string>variable.other.carbon</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>keywords</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(adapt|alias|choice|class|constraint|fn|import|inline|interface|let|library|match_first|namespace|observe|require|var)\b</string>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>`base` introduces a base class declaration unless it modifies one.</string>
|
|
<key>match</key>
|
|
<string>\b(base)\b(?!\s*class\b)</string>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(export)\b(?!\s*import\b)</string>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(impl)\b(?!\s*(fn|library|package)\b)</string>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>`package` is an introducer unless it begins a qualified name.</string>
|
|
<key>match</key>
|
|
<string>\b(package)\b(?!\.)</string>
|
|
<key>name</key>
|
|
<string>storage.type.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(abstract|const|eval|extend|extern|final|generic|musteval|override|partial|private|protected|ref|runtime|static|template|unsafe|unused|val|virtual)\b</string>
|
|
<key>name</key>
|
|
<string>storage.modifier.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>`default` is a declaration modifier unless it opens a match arm.</string>
|
|
<key>match</key>
|
|
<string>\b(default)\b(?!\s*=>)</string>
|
|
<key>name</key>
|
|
<string>storage.modifier.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(base)\b(?=\s*class\b)</string>
|
|
<key>name</key>
|
|
<string>storage.modifier.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(export)\b(?=\s*import\b)</string>
|
|
<key>name</key>
|
|
<string>storage.modifier.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(impl)\b(?=\s*(fn|library|package)\b)</string>
|
|
<key>name</key>
|
|
<string>storage.modifier.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(break|case|continue|else|for|if|match|return|returned|then|while)\b</string>
|
|
<key>name</key>
|
|
<string>keyword.control.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>`default` is a match arm here, and a declaration modifier elsewhere.</string>
|
|
<key>match</key>
|
|
<string>\b(default)\b(?=\s*=>)</string>
|
|
<key>name</key>
|
|
<string>keyword.control.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(and|as|impls|in|like|not|or|typeof|where)\b</string>
|
|
<key>name</key>
|
|
<string>keyword.control.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(destroy|each|expand|forall|form|friend)\b</string>
|
|
<key>name</key>
|
|
<string>keyword.other.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>`.base` names the base class subobject.</string>
|
|
<key>match</key>
|
|
<string>(?<=\.)\b(base)\b</string>
|
|
<key>name</key>
|
|
<string>keyword.other.carbon</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>literals</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(self|Self)\b</string>
|
|
<key>name</key>
|
|
<string>variable.language.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>The wildcard pattern.</string>
|
|
<key>match</key>
|
|
<string>\b(_)\b</string>
|
|
<key>name</key>
|
|
<string>variable.language.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>Language-provided package roots.</string>
|
|
<key>match</key>
|
|
<string>\b(Core|Cpp)\b</string>
|
|
<key>name</key>
|
|
<string>support.class.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>`package` as a qualified-name root names the current package.</string>
|
|
<key>match</key>
|
|
<string>\b(package)\b(?=\.)</string>
|
|
<key>name</key>
|
|
<string>variable.language.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(true|false)\b</string>
|
|
<key>name</key>
|
|
<string>constant.language.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b(array|auto|bool|char|str|type)\b</string>
|
|
<key>name</key>
|
|
<string>support.type.builtin.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>Integer and float type literals. The lexer accepts any width, so this must not be restricted to the common ones.</string>
|
|
<key>match</key>
|
|
<string>\b[iuf][1-9][0-9]*\b</string>
|
|
<key>name</key>
|
|
<string>support.type.builtin.carbon</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>numbers</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b0x[_0-9A-Fa-f]*(?:\.[_0-9A-Fa-f]*)?(?:[pP][-+]?[0-9]+)?</string>
|
|
<key>name</key>
|
|
<string>constant.numeric.hex.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b0o[_0-7]*</string>
|
|
<key>name</key>
|
|
<string>constant.numeric.octal.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b0b[_01]*</string>
|
|
<key>name</key>
|
|
<string>constant.numeric.binary.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\b[0-9][_0-9]*(?:\.[_0-9]+)?(?:[eE][-+]?[0-9]+)?</string>
|
|
<key>name</key>
|
|
<string>constant.numeric.decimal.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>comment</key>
|
|
<string>Positional parameter, as used in lambdas.</string>
|
|
<key>match</key>
|
|
<string>\$[0-9]+</string>
|
|
<key>name</key>
|
|
<string>variable.parameter.carbon</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>operators</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>(\->\?|>>=|<=>|<<=|\&=|\^=|:=|:\?|==|=>|!=|>=|>>|<=|<>|<<|<\-|\-=|\->|\-\-|%=|\|=|\+=|\+\+|/=|\*=|\~=|\&|@|\^|:|=|!|>|<|\-|%|\.|\||\+|\?|/|\*|\~|\\)</string>
|
|
<key>name</key>
|
|
<string>keyword.operator.carbon</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>punctuation</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>,</string>
|
|
<key>name</key>
|
|
<string>punctuation.separator.carbon</string>
|
|
</dict>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>;</string>
|
|
<key>name</key>
|
|
<string>punctuation.terminator.carbon</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>string-escapes</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\\(?:[tnr0'\"\\]|x[0-9A-Fa-f]{2}|u\{[0-9A-Fa-f]+\})</string>
|
|
<key>name</key>
|
|
<string>constant.character.escape.carbon</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>string-escapes-1</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\\#(?:[tnr0'\"\\]|x[0-9A-Fa-f]{2}|u\{[0-9A-Fa-f]+\})</string>
|
|
<key>name</key>
|
|
<string>constant.character.escape.carbon</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>string-escapes-2</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\\##(?:[tnr0'\"\\]|x[0-9A-Fa-f]{2}|u\{[0-9A-Fa-f]+\})</string>
|
|
<key>name</key>
|
|
<string>constant.character.escape.carbon</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>string-escapes-raw</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>match</key>
|
|
<string>\\#{3,}(?:[tnr0'\"\\]|x[0-9A-Fa-f]{2}|u\{[0-9A-Fa-f]+\})</string>
|
|
<key>name</key>
|
|
<string>constant.character.escape.carbon</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<key>strings</key>
|
|
<dict>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>(#{3,})(''')([^\s'\"#]*)</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>3</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>entity.name.tag.language.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Block string literal, with an optional file type indicator, raw at `###` level.</string>
|
|
<key>end</key>
|
|
<string>(''')\1</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>name</key>
|
|
<string>string.quoted.triple.carbon</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#string-escapes-raw</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>(##)(''')([^\s'\"#]*)</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>3</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>entity.name.tag.language.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Block string literal, with an optional file type indicator, raw at `##` level.</string>
|
|
<key>end</key>
|
|
<string>('''##)</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>name</key>
|
|
<string>string.quoted.triple.carbon</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#string-escapes-2</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>(#)(''')([^\s'\"#]*)</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>3</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>entity.name.tag.language.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Block string literal, with an optional file type indicator, raw at `#` level.</string>
|
|
<key>end</key>
|
|
<string>('''#)</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>name</key>
|
|
<string>string.quoted.triple.carbon</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#string-escapes-1</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>(''')([^\s'\"#]*)</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>entity.name.tag.language.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Block string literal, with an optional file type indicator.</string>
|
|
<key>end</key>
|
|
<string>(''')</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>name</key>
|
|
<string>string.quoted.triple.carbon</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#string-escapes</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>(""")([^\s'\"#]*)</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>entity.name.tag.language.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>A `"""` block is always an error, but highlighting it as a block string keeps the rest of the file readable.</string>
|
|
<key>end</key>
|
|
<string>(""")</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>name</key>
|
|
<string>string.quoted.triple.carbon</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#string-escapes</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>(#{3,})(")</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Single-line string literal, raw at `###` level.</string>
|
|
<key>end</key>
|
|
<string>(")\1|$</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>name</key>
|
|
<string>string.quoted.double.carbon</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#string-escapes-raw</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>(##)(")</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Single-line string literal, raw at `##` level.</string>
|
|
<key>end</key>
|
|
<string>("##)|$</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>name</key>
|
|
<string>string.quoted.double.carbon</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#string-escapes-2</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>(#)(")</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
<key>2</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Single-line string literal, raw at `#` level.</string>
|
|
<key>end</key>
|
|
<string>("#)|$</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>name</key>
|
|
<string>string.quoted.double.carbon</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#string-escapes-1</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>(")</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Single-line string literal.</string>
|
|
<key>end</key>
|
|
<string>(")|$</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>name</key>
|
|
<string>string.quoted.double.carbon</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#string-escapes</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
<dict>
|
|
<key>begin</key>
|
|
<string>(')</string>
|
|
<key>beginCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.begin.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>comment</key>
|
|
<string>Character literal.</string>
|
|
<key>end</key>
|
|
<string>(')|$</string>
|
|
<key>endCaptures</key>
|
|
<dict>
|
|
<key>1</key>
|
|
<dict>
|
|
<key>name</key>
|
|
<string>punctuation.definition.string.end.carbon</string>
|
|
</dict>
|
|
</dict>
|
|
<key>name</key>
|
|
<string>string.quoted.single.carbon</string>
|
|
<key>patterns</key>
|
|
<array>
|
|
<dict>
|
|
<key>include</key>
|
|
<string>#string-escapes</string>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
</dict>
|
|
<key>scopeName</key>
|
|
<string>source.carbon</string>
|
|
<key>uuid</key>
|
|
<string>4568a54d-9a79-41ac-a36b-05916252763b</string>
|
|
</dict>
|
|
</plist>
|