mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Update grammars (#245340)
This commit is contained in:
@@ -4,217 +4,28 @@
|
||||
"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/jlelong/vscode-latex-basics/commit/c787db94a56bd93131ce0938046063320a02cc73",
|
||||
"version": "https://github.com/jlelong/vscode-latex-basics/commit/0fcf9283828cab2aa611072f54feb1e7d501c2b4",
|
||||
"name": "BibTeX",
|
||||
"scopeName": "text.bibtex",
|
||||
"comment": "Grammar based on description from https://github.com/aclements/biblib\n",
|
||||
"comment": "Grammar based on description from https://github.com/aclements/biblib",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "@(?i:comment)(?=[\\s{(])",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.bibtex"
|
||||
}
|
||||
},
|
||||
"match": "@(?i:comment)(?=[\\s{(])",
|
||||
"name": "comment.block.at-sign.bibtex"
|
||||
},
|
||||
{
|
||||
"begin": "((@)(?i:preamble))\\s*(\\{)\\s*",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.preamble.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.preamble.begin.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.preamble.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.preamble.braces.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
"include": "#preamble"
|
||||
},
|
||||
{
|
||||
"begin": "((@)(?i:preamble))\\s*(\\()\\s*",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.preamble.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.preamble.begin.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.preamble.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.preamble.parenthesis.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"begin": "((@)(?i:string))\\s*(\\{)\\s*([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.string-constant.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.string-constant.begin.bibtex"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.other.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.string-constant.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.string-constant.braces.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "((@)(?i:string))\\s*(\\()\\s*([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.string-constant.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.string-constant.begin.bibtex"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.other.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.string-constant.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.string-constant.parenthesis.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "((@)[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\{)\\s*([^\\s,}]*)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.entry-type.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.entry.begin.bibtex"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.name.type.entry-key.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.entry.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.entry.braces.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\=)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.key.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.key-value.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "(?=[,}])",
|
||||
"name": "meta.key-assignment.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "((@)[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\()\\s*([^\\s,]*)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.entry-type.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.entry.begin.bibtex"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.name.type.entry-key.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.entry.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.entry.parenthesis.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\=)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.key.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.key-value.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "(?=[,)])",
|
||||
"name": "meta.key-assignment.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"include": "#entry"
|
||||
},
|
||||
{
|
||||
"begin": "[^@\\n]",
|
||||
@@ -223,6 +34,216 @@
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"preamble": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "((@)(?i:preamble))\\s*(\\{)\\s*",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.preamble.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.preamble.begin.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.preamble.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.preamble.braces.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "((@)(?i:preamble))\\s*(\\()\\s*",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.preamble.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.preamble.begin.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.preamble.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.preamble.parenthesis.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"string": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "((@)(?i:string))\\s*(\\{)\\s*([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.string-constant.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.string-constant.begin.bibtex"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.other.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.string-constant.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.string-constant.braces.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "((@)(?i:string))\\s*(\\()\\s*([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.string-constant.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.string-constant.begin.bibtex"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.other.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.string-constant.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.string-constant.parenthesis.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"entry": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "((@)[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\{)\\s*([^\\s,}]*)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.entry-type.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.entry.begin.bibtex"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.name.type.entry-key.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.entry.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.entry.braces.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\=)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.key.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.key-value.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "(?=[,}])",
|
||||
"name": "meta.key-assignment.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "((@)[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\()\\s*([^\\s,]*)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.entry-type.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.bibtex"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.entry.begin.bibtex"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.name.type.entry-key.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "\\)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.entry.end.bibtex"
|
||||
}
|
||||
},
|
||||
"name": "meta.entry.parenthesis.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\=)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.key.bibtex"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.key-value.bibtex"
|
||||
}
|
||||
},
|
||||
"end": "(?=[,)])",
|
||||
"name": "meta.key-assignment.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#field_value"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"field_value": {
|
||||
"patterns": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user