Update grammars

This commit is contained in:
Alex Ross
2019-09-02 11:39:10 +02:00
parent 155f85b679
commit 3ac5830dcf
23 changed files with 16425 additions and 4601 deletions

View File

@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/textmate/swift.tmbundle/commit/bdc8ae07562060a566b33da3f62601bb5aababd1",
"version": "https://github.com/textmate/swift.tmbundle/commit/3f582e9acc1613745b06a56be55ba2a032c458eb",
"name": "Swift",
"scopeName": "source.swift",
"comment": "See swift.tmbundle/grammar-test.swift for test cases.",
@@ -2759,10 +2759,13 @@
}
},
"comment": "SE-0168: Multi-Line String Literals",
"end": "\"\"\"",
"end": "\"\"\"(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.block.swift",
@@ -2785,6 +2788,66 @@
}
]
},
{
"begin": "#\"\"\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.swift"
}
},
"end": "\"\"\"#(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.block.raw.swift",
"patterns": [
{
"match": "\\G.+(?=\"\"\")|\\G.+",
"name": "invalid.illegal.content-after-opening-delimiter.swift"
},
{
"match": "\\\\#\\s*\\n",
"name": "constant.character.escape.newline.swift"
},
{
"include": "#raw-string-guts"
},
{
"comment": "Allow \\(\"\"\"...\"\"\") to appear inside a block string",
"match": "\\S((?!\\\\#\\().)*(?=\"\"\")",
"name": "invalid.illegal.content-before-closing-delimiter.swift"
}
]
},
{
"begin": "(##+)\"\"\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.swift"
}
},
"end": "\"\"\"\\1(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.block.raw.swift",
"patterns": [
{
"match": "\\G.+(?=\"\"\")|\\G.+",
"name": "invalid.illegal.content-after-opening-delimiter.swift"
}
]
},
{
"begin": "\"",
"beginCaptures": {
@@ -2792,10 +2855,13 @@
"name": "punctuation.definition.string.begin.swift"
}
},
"end": "\"",
"end": "\"(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.single-line.swift",
@@ -2808,9 +2874,108 @@
"include": "#string-guts"
}
]
},
{
"begin": "(##+)\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.raw.swift"
}
},
"comment": "SE-0168: raw string literals (more than one #, grammar limitations prevent us from supporting escapes)",
"end": "\"\\1(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.raw.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.single-line.raw.swift",
"patterns": [
{
"match": "\\r|\\n",
"name": "invalid.illegal.returns-not-allowed.swift"
}
]
},
{
"begin": "#\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.raw.swift"
}
},
"comment": "SE-0168: raw string literals (one #, escapes supported)",
"end": "\"#(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.raw.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.single-line.raw.swift",
"patterns": [
{
"match": "\\r|\\n",
"name": "invalid.illegal.returns-not-allowed.swift"
},
{
"include": "#raw-string-guts"
}
]
}
],
"repository": {
"raw-string-guts": {
"comment": "the same as #string-guts but with # in escapes",
"patterns": [
{
"match": "\\\\#[0\\\\tnr\"']",
"name": "constant.character.escape.swift"
},
{
"match": "\\\\#u\\{[0-9a-fA-F]{1,8}\\}",
"name": "constant.character.escape.unicode.swift"
},
{
"begin": "\\\\#\\(",
"beginCaptures": {
"0": {
"name": "punctuation.section.embedded.begin.swift"
}
},
"contentName": "source.swift",
"end": "(\\))",
"endCaptures": {
"0": {
"name": "punctuation.section.embedded.end.swift"
},
"1": {
"name": "source.swift"
}
},
"name": "meta.embedded.line.swift",
"patterns": [
{
"include": "$self"
},
{
"begin": "\\(",
"comment": "Nested parens",
"end": "\\)"
}
]
},
{
"match": "\\\\#.",
"name": "invalid.illegal.escape-not-recognized"
}
]
},
"string-guts": {
"patterns": [
{