Update grammars

This commit is contained in:
Alex Ross 2020-12-14 15:50:05 +01:00
parent c87c95a1a0
commit 4301777727
23 changed files with 1146 additions and 571 deletions

View file

@ -6,11 +6,11 @@
"git": {
"name": "jeff-hykin/cpp-textmate-grammar",
"repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
"commitHash": "ad9f1541fd376740c30a7257614c9cb5ed25005d"
"commitHash": "f074a48ae0b7ba313af3faf3d8bfda8537864bd1"
}
},
"license": "MIT",
"version": "1.15.3",
"version": "1.15.5",
"description": "The files syntaxes/c.json and syntaxes/c++.json were derived from https://github.com/atom/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
},
{

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/jeff-hykin/cpp-textmate-grammar/commit/afa42b3f5529833714ae354fbc638ece8f253074",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/f074a48ae0b7ba313af3faf3d8bfda8537864bd1",
"name": "C",
"scopeName": "source.c",
"patterns": [
@ -2939,9 +2939,6 @@
}
}
},
{
"include": "#comments_context"
},
{
"include": "#comments"
},
@ -3104,9 +3101,6 @@
"match": ":",
"name": "punctuation.separator.delimiter.colon.assembly.c"
},
{
"include": "#comments_context"
},
{
"include": "#comments"
}

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/jeff-hykin/cpp-textmate-grammar/commit/ad9f1541fd376740c30a7257614c9cb5ed25005d",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/f074a48ae0b7ba313af3faf3d8bfda8537864bd1",
"name": "C++",
"scopeName": "source.cpp.embedded.macro",
"patterns": [
@ -298,9 +298,6 @@
}
}
},
{
"include": "#comments_context"
},
{
"include": "#comments"
},
@ -463,9 +460,6 @@
"match": ":",
"name": "punctuation.separator.delimiter.colon.assembly.cpp"
},
{
"include": "#comments_context"
},
{
"include": "#comments"
}

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/jeff-hykin/cpp-textmate-grammar/commit/dc9c3ed759c84e0b168cc2140e6869ca97abbd14",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/f074a48ae0b7ba313af3faf3d8bfda8537864bd1",
"name": "C++",
"scopeName": "source.cpp",
"patterns": [
@ -344,9 +344,6 @@
}
}
},
{
"include": "#comments_context"
},
{
"include": "#comments"
},
@ -509,9 +506,6 @@
"match": ":",
"name": "punctuation.separator.delimiter.colon.assembly.cpp"
},
{
"include": "#comments_context"
},
{
"include": "#comments"
}

View file

@ -6,7 +6,7 @@
"git": {
"name": "ionide/ionide-fsgrammar",
"repositoryUrl": "https://github.com/ionide/ionide-fsgrammar",
"commitHash": "af037b23ca4c61b02799957a61cbd05b44355caf"
"commitHash": "fc4cac6d9bc1787f54ce48bbc77bcbb1de8160ff"
}
},
"license": "MIT",

View file

@ -7,7 +7,7 @@
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js ionide/ionide-fsgrammar grammar/fsharp.json ./syntaxes/fsharp.tmLanguage.json"
"update-grammar": "node ../../build/npm/update-grammar.js ionide/ionide-fsgrammar grammars/fsharp.json ./syntaxes/fsharp.tmLanguage.json"
},
"contributes": {
"languages": [{

View file

@ -1,10 +1,10 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/ionide/ionide-fsgrammar/blob/master/grammar/fsharp.json",
"This file has been converted from https://github.com/ionide/ionide-fsgrammar/blob/master/grammars/fsharp.json",
"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/ionide/ionide-fsgrammar/commit/af037b23ca4c61b02799957a61cbd05b44355caf",
"version": "https://github.com/ionide/ionide-fsgrammar/commit/fc4cac6d9bc1787f54ce48bbc77bcbb1de8160ff",
"name": "fsharp",
"scopeName": "source.fsharp",
"patterns": [
@ -560,6 +560,11 @@
}
},
"patterns": [
{
"comments": "Capture // when inside of (* *) like that the rule which capture comments starting by // is not trigger. See https://github.com/ionide/ionide-fsgrammar/issues/155",
"name": "fast-capture.comment.line.double-slash.fsharp",
"match": "//"
},
{
"include": "#comments"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -6,11 +6,11 @@
"git": {
"name": "vscode-logfile-highlighter",
"repositoryUrl": "https://github.com/emilast/vscode-logfile-highlighter",
"commitHash": "5dcab1c304110b605041824cde3810c6ef305477"
"commitHash": "6f6eecc097509c6ee8f4141a7bd6a1f243461d68"
}
},
"license": "MIT",
"version": "2.8.0"
"version": "2.9.0"
}
],
"version": 1

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/emilast/vscode-logfile-highlighter/commit/5dcab1c304110b605041824cde3810c6ef305477",
"version": "https://github.com/emilast/vscode-logfile-highlighter/commit/6f6eecc097509c6ee8f4141a7bd6a1f243461d68",
"name": "Log file",
"scopeName": "text.log",
"patterns": [
@ -73,7 +73,7 @@
"name": "comment log.date"
},
{
"match": "\\b\\d{2}[^\\w\\s]\\d{2}[^\\w\\s]\\d{4}\\b",
"match": "(?<=(^|\\s))\\d{2}[^\\w\\s]\\d{2}[^\\w\\s]\\d{4}\\b",
"name": "comment log.date"
},
{
@ -114,7 +114,7 @@
"name": "string.key, emphasis log.exception"
},
{
"match": "\\b(http|https|ftp|file)://\\S+\\b/?",
"match": "\\b[a-z]+://\\S+\\b/?",
"name": "constant.language log.constant"
},
{

View file

@ -33,12 +33,12 @@
"git": {
"name": "microsoft/vscode-markdown-tm-grammar",
"repositoryUrl": "https://github.com/microsoft/vscode-markdown-tm-grammar",
"commitHash": "11cf764606cb2cde54badb5d0e5a0758a8871c4b"
"commitHash": "7019b191c3ee38b6c345f3a2a843f223eb92ca1e"
}
},
"license": "MIT",
"version": "0.0.0"
"version": "1.0.0"
}
],
"version": 1
}
}

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/microsoft/vscode-markdown-tm-grammar/commit/f051a36bd9713dd722cbe1bdde9c8240d12f00b4",
"version": "https://github.com/microsoft/vscode-markdown-tm-grammar/commit/7019b191c3ee38b6c345f3a2a843f223eb92ca1e",
"name": "Markdown",
"scopeName": "text.html.markdown",
"patterns": [
@ -2574,7 +2574,7 @@
"name": "punctuation.definition.link.markdown"
}
},
"match": "(<)((?:mailto:)?[-.\\w]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)(>)",
"match": "(<)((?:mailto:)?[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)(>)",
"name": "meta.link.email.lt-gt.markdown"
},
"link-inet": {

View file

@ -6,11 +6,11 @@
"git": {
"name": "language-php",
"repositoryUrl": "https://github.com/atom/language-php",
"commitHash": "6c0da475f86b45ea990638525f68be7658986546"
"commitHash": "e2637e1c522c932459eb2d5cf1651c5cc38058a1"
}
},
"license": "MIT",
"version": "0.44.5"
"version": "0.44.7"
}
],
"version": 1

View file

@ -4,9 +4,12 @@
"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/atom/language-php/commit/6c0da475f86b45ea990638525f68be7658986546",
"version": "https://github.com/atom/language-php/commit/e2637e1c522c932459eb2d5cf1651c5cc38058a1",
"scopeName": "source.php",
"patterns": [
{
"include": "#attribute"
},
{
"include": "#comments"
},
@ -230,7 +233,7 @@
]
},
{
"begin": "(?ix)\n(?:\n (?:^|(?<=}))\\s*(?:(abstract|final)\\s+)?(class)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\n |\\b(new)\\s+(class)\\b # anonymous class\n)",
"begin": "(?ix)\n(?:\n \\b(?:(abstract|final)\\s+)?(class)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\n |\\b(new)\\b\\s*(\\#\\[.*\\])?\\s*\\b(class)\\b # anonymous class\n)",
"beginCaptures": {
"1": {
"name": "storage.modifier.${1:/downcase}.php"
@ -245,6 +248,13 @@
"name": "keyword.other.new.php"
},
"5": {
"patterns": [
{
"include": "#attribute"
}
]
},
"6": {
"name": "storage.type.class.php"
}
},
@ -410,30 +420,34 @@
"name": "meta.catch.php",
"patterns": [
{
"include": "#namespace"
},
{
"match": "(?xi)\n([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Exception class\n((?:\\s*\\|\\s*[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)*) # Optional additional exception classes\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable",
"match": "(?xi)\n([a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)*) # union or single exception class\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)? # Variable",
"captures": {
"1": {
"name": "support.class.exception.php"
},
"2": {
"patterns": [
{
"match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*",
"name": "support.class.exception.php"
},
{
"match": "\\|",
"name": "punctuation.separator.delimiter.php"
},
{
"begin": "(?i)(?=[\\\\a-z_\\x{7f}-\\x{7fffffff}])",
"end": "(?xi)\n( [a-z_\\x{7f}-\\x{7fffffff}] [a-z0-9_\\x{7f}-\\x{7fffffff}]* )\n(?![a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])",
"endCaptures": {
"1": {
"name": "support.class.exception.php"
}
},
"patterns": [
{
"include": "#namespace"
}
]
}
]
},
"3": {
"2": {
"name": "variable.other.php"
},
"4": {
"3": {
"name": "punctuation.definition.variable.php"
}
}
@ -496,7 +510,12 @@
"name": "punctuation.definition.parameters.end.bracket.round.php"
}
},
"name": "meta.function.closure.use.php",
"patterns": [
{
"match": ",",
"name": "punctuation.separator.delimiter.php"
},
{
"captures": {
"1": {
@ -509,22 +528,22 @@
"name": "punctuation.definition.variable.php"
}
},
"match": "(?i)((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\\s*(?=,|\\))",
"name": "meta.function.closure.use.php"
"match": "(?i)((?:(&)\\s*)?(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\\s*(?=,|\\))"
}
]
},
{
"match": "(:)\\s*(\\?)?\\s*((?:\\\\?[a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*)+)",
"match": "(?xi)\n(:)\\s*\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n)\n(?=\\s*(?:{|/[/*]|\\#|$))",
"captures": {
"1": {
"name": "keyword.operator.return-value.php"
},
"2": {
"name": "keyword.operator.nullable-type.php"
},
"3": {
"name": "storage.type.php"
"patterns": [
{
"include": "#php-types"
}
]
}
}
}
@ -546,7 +565,7 @@
"name": "meta.function.closure.php",
"patterns": [
{
"begin": "(&)?\\s*(\\()",
"begin": "(?:(&)\\s*)?(\\()",
"beginCaptures": {
"1": {
"name": "storage.modifier.reference.php"
@ -569,21 +588,109 @@
]
},
{
"match": "(:)\\s*(\\?)?\\s*((?:\\\\?[a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*)+)\\s*",
"match": "(?xi)\n(:)\\s*\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n)\n(?=\\s*(?:=>|/[/*]|\\#|$))",
"captures": {
"1": {
"name": "keyword.operator.return-value.php"
},
"2": {
"name": "keyword.operator.nullable-type.php"
},
"3": {
"name": "storage.type.php"
"patterns": [
{
"include": "#php-types"
}
]
}
}
}
]
},
{
"begin": "(?x)\n((?:(?:final|abstract|public|private|protected)\\s+)*)\n(function)\\s+(__construct)\n\\s*(\\()",
"beginCaptures": {
"1": {
"patterns": [
{
"match": "final|abstract|public|private|protected",
"name": "storage.modifier.php"
}
]
},
"2": {
"name": "storage.type.function.php"
},
"3": {
"name": "support.function.constructor.php"
},
"4": {
"name": "punctuation.definition.parameters.begin.bracket.round.php"
}
},
"contentName": "meta.function.parameters.php",
"end": "(?xi)\n(\\)) \\s* ( : \\s*\n (?:\\?\\s*)? (?!\\s) [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\\\s\\|]+ (?<!\\s)\n)?\n(?=\\s*(?:{|/[/*]|\\#|$))",
"endCaptures": {
"1": {
"name": "punctuation.definition.parameters.end.bracket.round.php"
},
"2": {
"name": "invalid.illegal.return-type.php"
}
},
"name": "meta.function.php",
"patterns": [
{
"include": "#comments"
},
{
"match": ",",
"name": "punctuation.separator.delimiter.php"
},
{
"begin": "(?xi)\n(public|private|protected) \\s+\n(?: (\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n) \\s+ )?\n((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference",
"beginCaptures": {
"1": {
"name": "storage.modifier.php"
},
"2": {
"patterns": [
{
"include": "#php-types"
}
]
},
"3": {
"name": "variable.other.php"
},
"4": {
"name": "storage.modifier.reference.php"
},
"5": {
"name": "punctuation.definition.variable.php"
}
},
"end": "(?=\\s*(?:,|\\)|/[/*]|\\#))",
"name": "meta.function.parameter.promoted-property.php",
"patterns": [
{
"begin": "=",
"beginCaptures": {
"0": {
"name": "keyword.operator.assignment.php"
}
},
"end": "(?=\\s*(?:,|\\)|/[/*]|\\#))",
"patterns": [
{
"include": "#parameter-default-types"
}
]
}
]
},
{
"include": "#function-parameters"
}
]
},
{
"begin": "(?x)\n((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n(function)\\s+\n(?i:\n (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|toString|\n clone|set_state|sleep|wakeup|autoload|invoke|callStatic|serialize|unserialize))\n |(?:(&)?\\s*([a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*))\n)\n\\s*(\\()",
"beginCaptures": {
@ -612,7 +719,7 @@
}
},
"contentName": "meta.function.parameters.php",
"end": "(\\))(?:\\s*(:)\\s*(\\?)?\\s*((?:\\\\?[a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*)+))?",
"end": "(?xi)\n(\\)) (?: \\s* (:) \\s* (\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n) )?\n(?=\\s*(?:{|/[/*]|\\#|$))",
"endCaptures": {
"1": {
"name": "punctuation.definition.parameters.end.bracket.round.php"
@ -621,10 +728,15 @@
"name": "keyword.operator.return-value.php"
},
"3": {
"name": "keyword.operator.nullable-type.php"
},
"4": {
"name": "storage.type.php"
"patterns": [
{
"match": "\\b(static)\\b",
"name": "storage.type.php"
},
{
"include": "#php-types"
}
]
}
},
"name": "meta.function.php",
@ -635,7 +747,7 @@
]
},
{
"match": "(?xi)\n((?:(?:public|private|protected|static)(?:\\s+|(?=\\?)))+) # At least one modifier\n(?:(\\?)?\\s* # Optional nullable\n (\\\\?(?:[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)*) # Optional namespace\n ([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*))? # Typehinted class name\n\\s+((\\$)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name",
"match": "(?xi)\n((?:(?:public|private|protected|static)(?:\\s+|(?=\\?)))+) # At least one modifier\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n)?\n\\s+ ((\\$)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name",
"captures": {
"1": {
"patterns": [
@ -646,28 +758,16 @@
]
},
"2": {
"name": "keyword.operator.nullable-type.php"
},
"3": {
"name": "support.other.namespace.php",
"patterns": [
{
"match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*",
"name": "storage.type.php"
},
{
"match": "\\\\",
"name": "punctuation.separator.inheritance.php"
"include": "#php-types"
}
]
},
"4": {
"name": "storage.type.php"
},
"5": {
"3": {
"name": "variable.other.php"
},
"6": {
"4": {
"name": "punctuation.definition.variable.php"
}
}
@ -737,7 +837,7 @@
}
},
{
"match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|var|function|interface|trait|parent|self|object)\\b",
"match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|var|function|interface|trait|parent|self|object|mixed)\\b",
"name": "storage.type.php"
},
{
@ -943,10 +1043,94 @@
}
],
"repository": {
"attribute-name": {
"patterns": [
{
"begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)",
"end": "(?xi)\n( [a-z_\\x{7f}-\\x{7fffffff}] [a-z0-9_\\x{7f}-\\x{7fffffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])",
"endCaptures": {
"1": {
"name": "support.attribute.php"
}
},
"patterns": [
{
"include": "#namespace"
}
]
},
{
"match": "(?xi)\n(\\\\)?\\b(Attribute)\\b",
"name": "support.attribute.builtin.php",
"captures": {
"1": {
"name": "punctuation.separator.inheritance.php"
}
}
},
{
"begin": "(?i)(?=[\\\\a-z_\\x{7f}-\\x{7fffffff}])",
"end": "(?xi)\n( [a-z_\\x{7f}-\\x{7fffffff}] [a-z0-9_\\x{7f}-\\x{7fffffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])",
"endCaptures": {
"1": {
"name": "support.attribute.php"
}
},
"patterns": [
{
"include": "#namespace"
}
]
}
]
},
"attribute": {
"begin": "\\#\\[",
"end": "\\]",
"name": "meta.attribute.php",
"patterns": [
{
"match": ",",
"name": "punctuation.separator.delimiter.php"
},
{
"begin": "([a-zA-Z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)\\s*(\\()",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#attribute-name"
}
]
},
"2": {
"name": "punctuation.definition.arguments.begin.bracket.round.php"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.arguments.end.bracket.round.php"
}
},
"patterns": [
{
"include": "#named-arguments"
},
{
"include": "$self"
}
]
},
{
"include": "#attribute-name"
}
]
},
"class-builtin": {
"patterns": [
{
"match": "(?xi)\n(\\\\)?\\b\n((APC|Append)Iterator|Array(Access|Iterator|Object)\n|Bad(Function|Method)CallException\n|(Caching|CallbackFilter)Iterator|Collator|Collectable|Cond|Countable|CURLFile\n|Date(Interval|Period|Time(Interface|Immutable|Zone)?)?|Directory(Iterator)?|DomainException\n|DOM(Attr|CdataSection|CharacterData|Comment|Document(Fragment)?|Element|EntityReference\n |Implementation|NamedNodeMap|Node(list)?|ProcessingInstruction|Text|XPath)\n|(Error)?Exception|EmptyIterator\n|finfo\n|Ev(Check|Child|Embed|Fork|Idle|Io|Loop|Periodic|Prepare|Signal|Stat|Timer|Watcher)?\n|Event(Base|Buffer(Event)?|SslContext|Http(Request|Connection)?|Config|DnsBase|Util|Listener)?\n|FANNConnection|(Filter|Filesystem)Iterator\n|Gender\\\\Gender|GlobIterator|Gmagick(Draw|Pixel)?\n|Haru(Annotation|Destination|Doc|Encoder|Font|Image|Outline|Page)\n|Http((Inflate|Deflate)?Stream|Message|Request(Pool)?|Response|QueryString)\n|HRTime\\\\(PerformanceCounter|StopWatch)\n|Intl(Calendar|((CodePoint|RuleBased)?Break|Parts)?Iterator|DateFormatter|TimeZone)\n|Imagick(Draw|Pixel(Iterator)?)?\n|InfiniteIterator|InvalidArgumentException|Iterator(Aggregate|Iterator)?\n|JsonSerializable\n|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|(AttachedPicture)?Frame))\n|Lapack|(Length|Locale|Logic)Exception|LimitIterator|Lua(Closure)?\n|Mongo(BinData|Client|Code|Collection|CommandCursor|Cursor(Exception)?|Date|DB(Ref)?|DeleteBatch\n |Grid(FS(Cursor|File)?)|Id|InsertBatch|Int(32|64)|Log|Pool|Regex|ResultException|Timestamp\n |UpdateBatch|Write(Batch|ConcernException))?\n|Memcache(d)?|MessageFormatter|MultipleIterator|Mutex\n|mysqli(_(driver|stmt|warning|result))?\n|MysqlndUh(Connection|PreparedStatement)\n|NoRewindIterator|Normalizer|NumberFormatter\n|OCI-(Collection|Lob)|OuterIterator|(OutOf(Bounds|Range)|Overflow)Exception\n|ParentIterator|PDO(Statement)?|Phar(Data|FileInfo)?|php_user_filter|Pool\n|QuickHash(Int(Set|StringHash)|StringIntHash)\n|Recursive(Array|Caching|Directory|Fallback|Filter|Iterator|Regex|Tree)?Iterator\n|Reflection(Class|Function(Abstract)?|Method|Object|Parameter|Property|(Zend)?Extension)?\n|RangeException|Reflector|RegexIterator|ResourceBundle|RuntimeException|RRD(Creator|Graph|Updater)\n|SAM(Connection|Message)|SCA(_(SoapProxy|LocalProxy))?\n|SDO_(DAS_(ChangeSummary|Data(Factory|Object)|Relational|Setting|XML(_Document)?)\n |Data(Factory|Object)|Exception|List|Model_(Property|ReflectionDataObject|Type)|Sequence)\n|SeekableIterator|Serializable|SessionHandler(Interface)?|SimpleXML(Iterator|Element)|SNMP\n|Soap(Client|Fault|Header|Param|Server|Var)\n|SphinxClient|Spoofchecker\n|Spl(DoublyLinkedList|Enum|File(Info|Object)|FixedArray|(Max|Min)?Heap|Observer|ObjectStorage\n |(Priority)?Queue|Stack|Subject|Type|TempFileObject)\n|SQLite(3(Result|Stmt)?|Database|Result|Unbuffered)\n|stdClass|streamWrapper|SVM(Model)?|Swish(Result(s)?|Search)?|Sync(Event|Mutex|ReaderWriter|Semaphore)\n|Thread(ed)?|tidy(Node)?|TokyoTyrant(Table|Iterator|Query)?|Transliterator|Traversable\n|UConverter|(Underflow|UnexpectedValue)Exception\n|V8Js(Exception)?|Varnish(Admin|Log|Stat)\n|Worker|Weak(Map|Ref)\n|XML(Diff\\\\(Base|DOM|File|Memory)|Reader|Writer)|XsltProcessor\n|Yaf_(Route_(Interface|Map|Regex|Rewrite|Simple|Supervar)\n |Action_Abstract|Application|Config_(Simple|Ini|Abstract)|Controller_Abstract\n |Dispatcher|Exception|Loader|Plugin_Abstract|Registry|Request_(Abstract|Simple|Http)\n |Response_Abstract|Router|Session|View_(Simple|Interface))\n|Yar_(Client(_Exception)?|Concurrent_Client|Server(_Exception)?)\n|ZipArchive|ZMQ(Context|Device|Poll|Socket)?)\n\\b",
"match": "(?xi)\n(\\\\)?\\b\n(Attribute|(APC|Append)Iterator|Array(Access|Iterator|Object)\n|Bad(Function|Method)CallException\n|(Caching|CallbackFilter)Iterator|Collator|Collectable|Cond|Countable|CURLFile\n|Date(Interval|Period|Time(Interface|Immutable|Zone)?)?|Directory(Iterator)?|DomainException\n|DOM(Attr|CdataSection|CharacterData|Comment|Document(Fragment)?|Element|EntityReference\n |Implementation|NamedNodeMap|Node(list)?|ProcessingInstruction|Text|XPath)\n|(Error)?Exception|EmptyIterator\n|finfo\n|Ev(Check|Child|Embed|Fork|Idle|Io|Loop|Periodic|Prepare|Signal|Stat|Timer|Watcher)?\n|Event(Base|Buffer(Event)?|SslContext|Http(Request|Connection)?|Config|DnsBase|Util|Listener)?\n|FANNConnection|(Filter|Filesystem)Iterator\n|Gender\\\\Gender|GlobIterator|Gmagick(Draw|Pixel)?\n|Haru(Annotation|Destination|Doc|Encoder|Font|Image|Outline|Page)\n|Http((Inflate|Deflate)?Stream|Message|Request(Pool)?|Response|QueryString)\n|HRTime\\\\(PerformanceCounter|StopWatch)\n|Intl(Calendar|((CodePoint|RuleBased)?Break|Parts)?Iterator|DateFormatter|TimeZone)\n|Imagick(Draw|Pixel(Iterator)?)?\n|InfiniteIterator|InvalidArgumentException|Iterator(Aggregate|Iterator)?\n|JsonSerializable\n|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|(AttachedPicture)?Frame))\n|Lapack|(Length|Locale|Logic)Exception|LimitIterator|Lua(Closure)?\n|Mongo(BinData|Client|Code|Collection|CommandCursor|Cursor(Exception)?|Date|DB(Ref)?|DeleteBatch\n |Grid(FS(Cursor|File)?)|Id|InsertBatch|Int(32|64)|Log|Pool|Regex|ResultException|Timestamp\n |UpdateBatch|Write(Batch|ConcernException))?\n|Memcache(d)?|MessageFormatter|MultipleIterator|Mutex\n|mysqli(_(driver|stmt|warning|result))?\n|MysqlndUh(Connection|PreparedStatement)\n|NoRewindIterator|Normalizer|NumberFormatter\n|OCI-(Collection|Lob)|OuterIterator|(OutOf(Bounds|Range)|Overflow)Exception\n|ParentIterator|PDO(Statement)?|Phar(Data|FileInfo)?|php_user_filter|Pool\n|QuickHash(Int(Set|StringHash)|StringIntHash)\n|Recursive(Array|Caching|Directory|Fallback|Filter|Iterator|Regex|Tree)?Iterator\n|Reflection(Class|Function(Abstract)?|Method|Object|Parameter|Property|(Zend)?Extension)?\n|RangeException|Reflector|RegexIterator|ResourceBundle|RuntimeException|RRD(Creator|Graph|Updater)\n|SAM(Connection|Message)|SCA(_(SoapProxy|LocalProxy))?\n|SDO_(DAS_(ChangeSummary|Data(Factory|Object)|Relational|Setting|XML(_Document)?)\n |Data(Factory|Object)|Exception|List|Model_(Property|ReflectionDataObject|Type)|Sequence)\n|SeekableIterator|Serializable|SessionHandler(Interface)?|SimpleXML(Iterator|Element)|SNMP\n|Soap(Client|Fault|Header|Param|Server|Var)\n|SphinxClient|Spoofchecker\n|Spl(DoublyLinkedList|Enum|File(Info|Object)|FixedArray|(Max|Min)?Heap|Observer|ObjectStorage\n |(Priority)?Queue|Stack|Subject|Type|TempFileObject)\n|SQLite(3(Result|Stmt)?|Database|Result|Unbuffered)\n|stdClass|streamWrapper|SVM(Model)?|Swish(Result(s)?|Search)?|Sync(Event|Mutex|ReaderWriter|Semaphore)\n|Thread(ed)?|tidy(Node)?|TokyoTyrant(Table|Iterator|Query)?|Transliterator|Traversable\n|UConverter|(Underflow|UnexpectedValue)Exception\n|V8Js(Exception)?|Varnish(Admin|Log|Stat)\n|Worker|Weak(Map|Ref)\n|XML(Diff\\\\(Base|DOM|File|Memory)|Reader|Writer)|XsltProcessor\n|Yaf_(Route_(Interface|Map|Regex|Rewrite|Simple|Supervar)\n |Action_Abstract|Application|Config_(Simple|Ini|Abstract)|Controller_Abstract\n |Dispatcher|Exception|Loader|Plugin_Abstract|Registry|Request_(Abstract|Simple|Http)\n |Response_Abstract|Router|Session|View_(Simple|Interface))\n|Yar_(Client(_Exception)?|Concurrent_Client|Server(_Exception)?)\n|ZipArchive|ZMQ(Context|Device|Poll|Socket)?)\n\\b",
"name": "support.class.builtin.php",
"captures": {
"1": {
@ -959,8 +1143,8 @@
"class-name": {
"patterns": [
{
"begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)",
"end": "(?i)([a-z_][a-z_0-9]*)?(?![a-z0-9_\\\\])",
"begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)",
"end": "(?xi)\n( [a-z_\\x{7f}-\\x{7fffffff}] [a-z0-9_\\x{7f}-\\x{7fffffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])",
"endCaptures": {
"1": {
"name": "support.class.php"
@ -976,8 +1160,8 @@
"include": "#class-builtin"
},
{
"begin": "(?=[\\\\a-zA-Z_])",
"end": "(?i)([a-z_][a-z_0-9]*)?(?![a-z0-9_\\\\])",
"begin": "(?i)(?=[\\\\a-z_\\x{7f}-\\x{7fffffff}])",
"end": "(?xi)\n( [a-z_\\x{7f}-\\x{7fffffff}] [a-z0-9_\\x{7f}-\\x{7fffffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])",
"endCaptures": {
"1": {
"name": "support.class.php"
@ -1125,132 +1309,51 @@
"name": "punctuation.separator.delimiter.php"
},
{
"begin": "(?xi)\n(?:(\\?)\\s*)?(array) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n\\s*(=)\\s*(array)\\s*(\\() # Default value",
"beginCaptures": {
"1": {
"name": "keyword.operator.nullable-type.php"
},
"2": {
"name": "storage.type.php"
},
"3": {
"name": "variable.other.php"
},
"4": {
"name": "storage.modifier.reference.php"
},
"5": {
"name": "punctuation.definition.variable.php"
},
"6": {
"name": "keyword.operator.assignment.php"
},
"7": {
"name": "support.function.construct.php"
},
"8": {
"name": "punctuation.definition.array.begin.bracket.round.php"
}
},
"contentName": "meta.array.php",
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.array.end.bracket.round.php"
}
},
"name": "meta.function.parameter.array.php",
"patterns": [
{
"include": "#comments"
},
{
"include": "#strings"
},
{
"include": "#numbers"
}
]
},
{
"match": "(?xi)\n(?:(\\?)\\s*)?(array|callable) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n(?: # Optional default value\n \\s*(=)\\s*\n (?:\n (null)\n |\n (\\[)((?>[^\\[\\]]+|\\[\\g<8>\\])*)(\\])\n |((?:\\S*?\\(\\))|(?:\\S*?))\n )\n)?\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment",
"name": "meta.function.parameter.array.php",
"match": "(?xi)\n(?: (\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n) \\s+ )?\n((?:(&)\\s*)?(\\.\\.\\.)(\\$)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n(?=\\s*(?:,|\\)|/[/*]|\\#|$)) # A closing parentheses (end of argument list) or a comma or a comment",
"captures": {
"1": {
"name": "keyword.operator.nullable-type.php"
},
"2": {
"name": "storage.type.php"
},
"3": {
"name": "variable.other.php"
},
"4": {
"name": "storage.modifier.reference.php"
},
"5": {
"name": "punctuation.definition.variable.php"
},
"6": {
"name": "keyword.operator.assignment.php"
},
"7": {
"name": "constant.language.php"
},
"8": {
"name": "punctuation.section.array.begin.php"
},
"9": {
"patterns": [
{
"include": "#parameter-default-types"
"include": "#php-types"
}
]
},
"10": {
"name": "punctuation.section.array.end.php"
},
"11": {
"name": "invalid.illegal.non-null-typehinted.php"
}
}
},
{
"begin": "(?xi)\n(?:(\\?)\\s*)?\n(\\\\?(?:[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)*) # Optional namespace\n([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Typehinted class name\n\\s+((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference",
"beginCaptures": {
"1": {
"name": "keyword.operator.nullable-type.php"
},
"2": {
"name": "support.other.namespace.php",
"patterns": [
{
"match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*",
"name": "storage.type.php"
},
{
"match": "\\\\",
"name": "punctuation.separator.inheritance.php"
}
]
},
"3": {
"name": "storage.type.php"
},
"4": {
"name": "variable.other.php"
},
"5": {
"3": {
"name": "storage.modifier.reference.php"
},
"6": {
"4": {
"name": "keyword.operator.variadic.php"
},
"7": {
"5": {
"name": "punctuation.definition.variable.php"
}
},
"end": "(?=,|\\)|/[/*]|\\#)",
"name": "meta.function.parameter.variadic.php"
},
{
"begin": "(?xi)\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n)\n\\s+ ((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#php-types"
}
]
},
"2": {
"name": "variable.other.php"
},
"3": {
"name": "storage.modifier.reference.php"
},
"4": {
"name": "punctuation.definition.variable.php"
}
},
"end": "(?=\\s*(?:,|\\)|/[/*]|\\#))",
"name": "meta.function.parameter.typehinted.php",
"patterns": [
{
@ -1260,16 +1363,17 @@
"name": "keyword.operator.assignment.php"
}
},
"end": "(?=,|\\)|/[/*]|\\#)",
"end": "(?=\\s*(?:,|\\)|/[/*]|\\#))",
"patterns": [
{
"include": "$self"
"include": "#parameter-default-types"
}
]
}
]
},
{
"match": "(?xi)\n((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n(?=\\s*(?:,|\\)|/[/*]|\\#|$)) # A closing parentheses (end of argument list) or a comma or a comment",
"captures": {
"1": {
"name": "variable.other.php"
@ -1278,17 +1382,13 @@
"name": "storage.modifier.reference.php"
},
"3": {
"name": "keyword.operator.variadic.php"
},
"4": {
"name": "punctuation.definition.variable.php"
}
},
"match": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment",
"name": "meta.function.parameter.no-default.php"
},
{
"begin": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n\\s*(=)\\s*\n(?:(\\[)((?>[^\\[\\]]+|\\[\\g<6>\\])*)(\\]))? # Optional default type",
"begin": "(?xi)\n((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n\\s*(=)\\s*",
"beginCaptures": {
"1": {
"name": "variable.other.php"
@ -1297,29 +1397,13 @@
"name": "storage.modifier.reference.php"
},
"3": {
"name": "keyword.operator.variadic.php"
},
"4": {
"name": "punctuation.definition.variable.php"
},
"5": {
"4": {
"name": "keyword.operator.assignment.php"
},
"6": {
"name": "punctuation.section.array.begin.php"
},
"7": {
"patterns": [
{
"include": "#parameter-default-types"
}
]
},
"8": {
"name": "punctuation.section.array.end.php"
}
},
"end": "(?=,|\\)|/[/*]|\\#)",
"end": "(?=\\s*(?:,|\\)|/[/*]|\\#))",
"name": "meta.function.parameter.default.php",
"patterns": [
{
@ -2154,13 +2238,13 @@
"invoke-call": {
"captures": {
"1": {
"name": "punctuation.definition.variable.php"
"name": "variable.other.php"
},
"2": {
"name": "variable.other.php"
"name": "punctuation.definition.variable.php"
}
},
"match": "(?i)(\\$+)([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)(?=\\s*\\()",
"match": "(?i)((\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)(?=\\s*\\()",
"name": "meta.function-call.invoke.php"
},
"namespace": {
@ -2283,6 +2367,29 @@
}
]
},
"php-types": {
"patterns": [
{
"match": "\\?",
"name": "keyword.operator.nullable-type.php"
},
{
"match": "\\|",
"name": "punctuation.separator.delimiter.php"
},
{
"match": "(?i)\\b(null|int|float|bool|string|array|object|callable|iterable|false|mixed)\\b",
"name": "storage.type.php"
},
{
"match": "(?i)\\b(parent|self)\\b",
"name": "storage.type.php"
},
{
"include": "#class-name"
}
]
},
"parameter-default-types": {
"patterns": [
{
@ -2332,6 +2439,25 @@
}
]
},
{
"begin": "\\[",
"beginCaptures": {
"0": {
"name": "punctuation.section.array.begin.php"
}
},
"end": "\\]|(?=\\?>)",
"endCaptures": {
"0": {
"name": "punctuation.section.array.end.php"
}
},
"patterns": [
{
"include": "$self"
}
]
},
{
"include": "#instantiation"
},
@ -2430,7 +2556,7 @@
"0": {
"patterns": [
{
"match": "(?x)\\b\n(string|integer|int|boolean|bool|float|double|object|mixed\n|array|resource|void|null|callback|false|true|self)\\b",
"match": "(?x)\\b\n(string|integer|int|boolean|bool|float|double|object|mixed\n|array|resource|void|null|callback|false|true|self|static)\\b",
"name": "keyword.other.type.php"
},
{

View file

@ -6,12 +6,12 @@
"git": {
"name": "rust-syntax",
"repositoryUrl": "https://github.com/dustypomerleau/rust-syntax",
"commitHash": "19f9aa86c0850b98db175754f019a2e79413353e"
"commitHash": "f202e7c2b0e962d78d82477b97c25a6234210c78"
}
},
"license": "MIT",
"description": "A TextMate-style grammar for Rust.",
"version": "0.2.13"
"version": "0.4.2"
}
],
"version": 1

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/dustypomerleau/rust-syntax/commit/19f9aa86c0850b98db175754f019a2e79413353e",
"version": "https://github.com/dustypomerleau/rust-syntax/commit/f202e7c2b0e962d78d82477b97c25a6234210c78",
"name": "Rust",
"scopeName": "source.rust",
"patterns": [
@ -52,7 +52,7 @@
{
"comment": "macro type metavariables",
"name": "meta.macro.metavariable.type.rust",
"match": "(\\$)((crate)|([A-Z][A-Za-z0-9_]*))((:)(block|expr|ident|item|lifetime|literal|meta|pat|path|stmt|tt|ty|vis))?",
"match": "(\\$)((crate)|([A-Z][A-Za-z0-9_]*))((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?",
"captures": {
"1": {
"name": "keyword.operator.macro.dollar.rust"
@ -79,7 +79,7 @@
{
"comment": "macro metavariables",
"name": "meta.macro.metavariable.rust",
"match": "(\\$)([a-z][A-Za-z0-9_]*)((:)(block|expr|ident|item|lifetime|literal|meta|pat|path|stmt|tt|ty|vis))?",
"match": "(\\$)([a-z][A-Za-z0-9_]*)((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?",
"captures": {
"1": {
"name": "keyword.operator.macro.dollar.rust"
@ -169,7 +169,7 @@
"match": "(mod)\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)",
"captures": {
"1": {
"name": "keyword.control.rust"
"name": "storage.type.rust"
},
"2": {
"name": "entity.name.module.rust"
@ -182,7 +182,7 @@
"begin": "\\b(extern)\\s+(crate)",
"beginCaptures": {
"1": {
"name": "keyword.control.rust"
"name": "storage.type.rust"
},
"2": {
"name": "keyword.other.crate.rust"
@ -215,7 +215,7 @@
"begin": "\\b(use)\\s",
"beginCaptures": {
"1": {
"name": "keyword.control.rust"
"name": "keyword.other.rust"
}
},
"end": ";",
@ -309,9 +309,14 @@
"block-comments": {
"patterns": [
{
"comment": "block comments",
"comment": "empty block comments",
"name": "comment.block.rust",
"begin": "/\\*(?!\\*)",
"match": "/\\*\\*/"
},
{
"comment": "block documentation comments",
"name": "comment.block.documentation.rust",
"begin": "/\\*\\*",
"end": "\\*/",
"patterns": [
{
@ -320,9 +325,9 @@
]
},
{
"comment": "block documentation comments",
"name": "comment.block.documentation.rust",
"begin": "/\\*\\*",
"comment": "block comments",
"name": "comment.block.rust",
"begin": "/\\*(?!\\*)",
"end": "\\*/",
"patterns": [
{
@ -344,7 +349,7 @@
"match": "\\b(const)\\s+([A-Z][A-Za-z0-9_]*)\\b",
"captures": {
"1": {
"name": "keyword.control.rust"
"name": "storage.type.rust"
},
"2": {
"name": "constant.other.caps.rust"
@ -406,7 +411,7 @@
{
"comment": "booleans",
"name": "constant.language.bool.rust",
"match": "\\btrue|false\\b"
"match": "\\b(true|false)\\b"
}
]
},
@ -452,7 +457,7 @@
"begin": "\\b(fn)\\s+((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)((\\()|(<))",
"beginCaptures": {
"1": {
"name": "keyword.control.fn.rust"
"name": "keyword.other.fn.rust"
},
"2": {
"name": "entity.name.function.rust"
@ -645,7 +650,7 @@
{
"comment": "control flow keywords",
"name": "keyword.control.rust",
"match": "\\b(async|await|break|continue|do|else|for|if|loop|match|move|return|try|where|while|yield)\\b"
"match": "\\b(await|break|continue|do|else|for|if|loop|match|return|try|while|yield)\\b"
},
{
"comment": "storage keywords",
@ -660,7 +665,7 @@
{
"comment": "other keywords",
"name": "keyword.other.rust",
"match": "\\b(as|become|box|dyn|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual)\\b"
"match": "\\b(as|async|become|box|dyn|move|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\\b"
},
{
"comment": "fn",
@ -677,11 +682,6 @@
"name": "storage.modifier.mut.rust",
"match": "\\bmut\\b"
},
{
"comment": "math operators",
"name": "keyword.operator.math.rust",
"match": "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))"
},
{
"comment": "logical operators",
"name": "keyword.operator.logical.rust",
@ -695,7 +695,7 @@
{
"comment": "assignment operators",
"name": "keyword.operator.assignment.rust",
"match": "(-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)"
"match": "(\\+=|-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)"
},
{
"comment": "single equal",
@ -707,6 +707,11 @@
"name": "keyword.operator.comparison.rust",
"match": "(=(=)?(?!>)|!=|<=|(?<!=)>=)"
},
{
"comment": "math operators",
"name": "keyword.operator.math.rust",
"match": "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))"
},
{
"comment": "less than, greater than (special case)",
"match": "(?:\\b|(?:(\\))|(\\])|(\\})))[ \\t]+([<>])[ \\t]+(?:\\b|(?:(\\()|(\\[)|(\\{)))",
@ -1129,7 +1134,7 @@
{
"comment": "variables",
"name": "variable.other.rust",
"match": "\\b(?<!\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b"
"match": "\\b(?<!(?<!\\.)\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b"
}
]
}

View file

@ -100,13 +100,13 @@
},
{
"c": "where",
"t": "source.rust keyword.control.rust",
"t": "source.rust keyword.other.rust",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
"dark_vs": "keyword.control: #569CD6",
"light_vs": "keyword.control: #0000FF",
"hc_black": "keyword.control: #C586C0"
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6"
}
},
{
@ -342,13 +342,13 @@
},
{
"c": "where",
"t": "source.rust keyword.control.rust",
"t": "source.rust keyword.other.rust",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
"dark_vs": "keyword.control: #569CD6",
"light_vs": "keyword.control: #0000FF",
"hc_black": "keyword.control: #C586C0"
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6"
}
},
{
@ -595,13 +595,13 @@
},
{
"c": "fn",
"t": "source.rust meta.function.definition.rust keyword.control.fn.rust",
"t": "source.rust meta.function.definition.rust keyword.other.fn.rust",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
"dark_vs": "keyword.control: #569CD6",
"light_vs": "keyword.control: #0000FF",
"hc_black": "keyword.control: #C586C0"
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6"
}
},
{
@ -738,13 +738,13 @@
},
{
"c": "where",
"t": "source.rust meta.function.definition.rust keyword.control.rust",
"t": "source.rust meta.function.definition.rust keyword.other.rust",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
"dark_vs": "keyword.control: #569CD6",
"light_vs": "keyword.control: #0000FF",
"hc_black": "keyword.control: #C586C0"
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6"
}
},
{
@ -859,13 +859,13 @@
},
{
"c": "fn",
"t": "source.rust meta.function.definition.rust keyword.control.fn.rust",
"t": "source.rust meta.function.definition.rust keyword.other.fn.rust",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
"dark_vs": "keyword.control: #569CD6",
"light_vs": "keyword.control: #0000FF",
"hc_black": "keyword.control: #C586C0"
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6"
}
},
{
@ -1002,13 +1002,13 @@
},
{
"c": "where",
"t": "source.rust meta.function.definition.rust keyword.control.rust",
"t": "source.rust meta.function.definition.rust keyword.other.rust",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
"dark_vs": "keyword.control: #569CD6",
"light_vs": "keyword.control: #0000FF",
"hc_black": "keyword.control: #C586C0"
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6"
}
},
{
@ -1200,13 +1200,13 @@
},
{
"c": "where",
"t": "source.rust keyword.control.rust",
"t": "source.rust keyword.other.rust",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
"dark_vs": "keyword.control: #569CD6",
"light_vs": "keyword.control: #0000FF",
"hc_black": "keyword.control: #C586C0"
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6"
}
},
{
@ -1442,13 +1442,13 @@
},
{
"c": "where",
"t": "source.rust keyword.control.rust",
"t": "source.rust keyword.other.rust",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
"dark_vs": "keyword.control: #569CD6",
"light_vs": "keyword.control: #0000FF",
"hc_black": "keyword.control: #C586C0"
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6"
}
},
{

View file

@ -1,13 +1,13 @@
[
{
"c": "use",
"t": "source.rust meta.use.rust keyword.control.rust",
"t": "source.rust meta.use.rust keyword.other.rust",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
"dark_vs": "keyword.control: #569CD6",
"light_vs": "keyword.control: #0000FF",
"hc_black": "keyword.control: #C586C0"
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6"
}
},
{
@ -67,13 +67,13 @@
},
{
"c": "fn",
"t": "source.rust meta.function.definition.rust keyword.control.fn.rust",
"t": "source.rust meta.function.definition.rust keyword.other.fn.rust",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
"dark_vs": "keyword.control: #569CD6",
"light_vs": "keyword.control: #0000FF",
"hc_black": "keyword.control: #C586C0"
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6"
}
},
{

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/97d29d2073853c328e42239c5d38c96e2e2ade9c",
"version": "https://github.com/textmate/swift.tmbundle/commit/d31bae2e0d6a4d977187dc7f06f538d6ba56b89b",
"name": "Swift",
"scopeName": "source.swift",
"comment": "See swift.tmbundle/grammar-test.swift for test cases.",
@ -754,6 +754,9 @@
{
"include": "#function-initializer"
},
{
"include": "#typed-variable-declaration"
},
{
"include": "#import"
},
@ -792,6 +795,10 @@
"match": "\\b(?:throws|rethrows)\\b",
"name": "keyword.control.exception.swift"
},
{
"match": "\\bsome\\b",
"name": "keyword.operator.type.opaque.swift"
},
{
"match": "\\binout\\b",
"name": "storage.modifier.swift"
@ -2228,6 +2235,20 @@
}
]
},
"typed-variable-declaration": {
"begin": "(?x)\n\t\t\t\t\t\t\\b(let|var)\\b\\s+\n\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\\s*\n\t\t\t\t\t\t:\n\t\t\t\t\t",
"beginCaptures": {
"1": {
"name": "keyword.other.declaration-specifier.swift"
}
},
"end": "(?=$|[={])",
"patterns": [
{
"include": "#available-types"
}
]
},
"types-precedencegroup": {
"patterns": [
{

View file

@ -6,7 +6,7 @@
"git": {
"name": "TypeScript-TmLanguage",
"repositoryUrl": "https://github.com/microsoft/TypeScript-TmLanguage",
"commitHash": "59b62cbc624e3a01368e5432d85af0c99a27d49d"
"commitHash": "a755c6bad619daa8349fb23149eeeff220a06603"
}
},
"license": "MIT",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long