mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
Update grammars (#196839)
Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
This commit is contained in:
@@ -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/328a68299533bc2b8c71028be741cce78a9e0d53",
|
||||
"version": "https://github.com/dustypomerleau/rust-syntax/commit/20730dff3c367cb40a7edd278fdaf0239ea50833",
|
||||
"name": "Rust",
|
||||
"scopeName": "source.rust",
|
||||
"patterns": [
|
||||
@@ -119,54 +119,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "attributes",
|
||||
"name": "meta.attribute.rust",
|
||||
"begin": "(#)(\\!?)(\\[)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.attribute.rust"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.attribute.inner.rust"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.brackets.attribute.rust"
|
||||
}
|
||||
},
|
||||
"end": "\\]",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.brackets.attribute.rust"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#block-comments"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
},
|
||||
{
|
||||
"include": "#lifetimes"
|
||||
},
|
||||
{
|
||||
"include": "#punctuation"
|
||||
},
|
||||
{
|
||||
"include": "#strings"
|
||||
},
|
||||
{
|
||||
"include": "#gtypes"
|
||||
},
|
||||
{
|
||||
"include": "#types"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "modules",
|
||||
"match": "(mod)\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)",
|
||||
@@ -257,6 +209,9 @@
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#attributes"
|
||||
},
|
||||
{
|
||||
"include": "#lvariables"
|
||||
},
|
||||
@@ -421,7 +376,7 @@
|
||||
"escapes": {
|
||||
"comment": "escapes: ASCII, byte, Unicode, quote, regex",
|
||||
"name": "constant.character.escape.rust",
|
||||
"match": "(\\\\)(?:(?:(x[0-7][0-7a-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))",
|
||||
"match": "(\\\\)(?:(?:(x[0-7][\\da-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "constant.character.escape.backslash.rust"
|
||||
@@ -440,6 +395,51 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"comment": "attributes",
|
||||
"name": "meta.attribute.rust",
|
||||
"begin": "(#)(\\!?)(\\[)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.attribute.rust"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.brackets.attribute.rust"
|
||||
}
|
||||
},
|
||||
"end": "\\]",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.brackets.attribute.rust"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#block-comments"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
},
|
||||
{
|
||||
"include": "#lifetimes"
|
||||
},
|
||||
{
|
||||
"include": "#punctuation"
|
||||
},
|
||||
{
|
||||
"include": "#strings"
|
||||
},
|
||||
{
|
||||
"include": "#gtypes"
|
||||
},
|
||||
{
|
||||
"include": "#types"
|
||||
}
|
||||
]
|
||||
},
|
||||
"functions": {
|
||||
"patterns": [
|
||||
{
|
||||
@@ -548,6 +548,9 @@
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#attributes"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
},
|
||||
@@ -608,6 +611,9 @@
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#attributes"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
},
|
||||
@@ -913,7 +919,7 @@
|
||||
},
|
||||
{
|
||||
"comment": "parameterized types",
|
||||
"begin": "\\b([A-Z][A-Za-z0-9]*)(<)",
|
||||
"begin": "\\b(_?[A-Z][A-Za-z0-9_]*)(<)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.rust"
|
||||
@@ -962,7 +968,7 @@
|
||||
},
|
||||
{
|
||||
"comment": "trait declarations",
|
||||
"match": "\\b(trait)\\s+([A-Z][A-Za-z0-9]*)\\b",
|
||||
"match": "\\b(trait)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.declaration.trait.rust storage.type.rust"
|
||||
@@ -974,7 +980,7 @@
|
||||
},
|
||||
{
|
||||
"comment": "struct declarations",
|
||||
"match": "\\b(struct)\\s+([A-Z][A-Za-z0-9]*)\\b",
|
||||
"match": "\\b(struct)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.declaration.struct.rust storage.type.rust"
|
||||
@@ -986,7 +992,7 @@
|
||||
},
|
||||
{
|
||||
"comment": "enum declarations",
|
||||
"match": "\\b(enum)\\s+([A-Z][A-Za-z0-9_]*)\\b",
|
||||
"match": "\\b(enum)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.declaration.enum.rust storage.type.rust"
|
||||
@@ -998,7 +1004,7 @@
|
||||
},
|
||||
{
|
||||
"comment": "type declarations",
|
||||
"match": "\\b(type)\\s+([A-Z][A-Za-z0-9_]*)\\b",
|
||||
"match": "\\b(type)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.declaration.type.rust storage.type.rust"
|
||||
@@ -1011,7 +1017,7 @@
|
||||
{
|
||||
"comment": "types",
|
||||
"name": "entity.name.type.rust",
|
||||
"match": "\\b[A-Z][A-Za-z0-9]*\\b(?!!)"
|
||||
"match": "\\b_?[A-Z][A-Za-z0-9_]*\\b(?!!)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user