mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Update grammars
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/JuliaEditorSupport/atom-language-julia/commit/6c80921298caa9e6c382f1fecec0bf3a83c3d9ec",
|
||||
"version": "https://github.com/JuliaEditorSupport/atom-language-julia/commit/cbf818c487848f8ab1293e0ff6650aaa3bf02f98",
|
||||
"name": "Julia",
|
||||
"scopeName": "source.julia",
|
||||
"comment": "This grammar is used by Atom (Oniguruma), GitHub (PCRE), and VSCode (Oniguruma),\nso all regexps must be compatible with both engines.\n\nSpecs:\n- https://github.com/kkos/oniguruma/blob/master/doc/RE\n- https://www.pcre.org/current/doc/html/",
|
||||
@@ -18,6 +18,9 @@
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#parentheses"
|
||||
},
|
||||
{
|
||||
"include": "#bracket"
|
||||
},
|
||||
@@ -83,6 +86,29 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"parentheses": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\(",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "meta.bracket.julia"
|
||||
}
|
||||
},
|
||||
"end": "\\)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "meta.bracket.julia"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "$self"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"bracket": {
|
||||
"patterns": [
|
||||
{
|
||||
@@ -135,13 +161,16 @@
|
||||
"function_call": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?\\.?(?=\\()",
|
||||
"begin": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?\\.?(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.julia"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.type.julia"
|
||||
},
|
||||
"3": {
|
||||
"name": "meta.bracket.julia"
|
||||
}
|
||||
},
|
||||
"end": "\\)(('|(\\.'))*\\.?')?",
|
||||
@@ -257,8 +286,15 @@
|
||||
"number": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?<!(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿]))((\\b0(x|X)[0-9a-fA-F](_?[0-9a-fA-F])*)|(\\b0o[0-7](_?[0-7])*)|(\\b0b[0-1](_?[0-1])*)|((\\b[0-9](_?[0-9])*\\.?(?!\\.)([_0-9]*))|(\\.[0-9](_?[0-9])*))([efE][+-]?[0-9](_?[0-9])*)?(im\\b)?|\\bInf(16|32|64)?\\b|\\bNaN(16|32|64)?\\b|\\bπ\\b|\\bpi\\b|\\bℯ\\b)",
|
||||
"name": "constant.numeric.julia"
|
||||
"match": "((?<!(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿]))(?:(?:\\b0(?:x|X)[0-9a-fA-F](?:_?[0-9a-fA-F])*)|(?:\\b0o[0-7](?:_?[0-7])*)|(?:\\b0b[0-1](?:_?[0-1])*)|(?:(?:\\b[0-9](?:_?[0-9])*\\.?(?!\\.)(?:[_0-9]*))|(?:\\.[0-9](?:_?[0-9])*))(?:[efE][+-]?[0-9](?:_?[0-9])*)?(?:im\\b|Inf(?:16|32|64)?\\b|NaN(?:16|32|64)?\\b|π\\b|pi\\b|ℯ\\b)?|\\bInf(?:16|32|64)?\\b|\\bNaN(?:16|32|64)?\\b|\\bπ\\b|\\bpi\\b|\\bℯ\\b))('*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "constant.numeric.julia"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.conjugate-number.julia"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "\\bARGS\\b|\\bC_NULL\\b|\\bDEPOT_PATH\\b|\\bENDIAN_BOM\\b|\\bENV\\b|\\bLOAD_PATH\\b|\\bPROGRAM_FILE\\b|\\bstdin\\b|\\bstdout\\b|\\bstderr\\b|\\bVERSION\\b|\\bdevnull\\b",
|
||||
@@ -437,33 +473,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "((i?cxxt?)|([rpv]cpp))(\")",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.macro.julia"
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.definition.string.begin.julia"
|
||||
}
|
||||
},
|
||||
"end": "\"",
|
||||
"name": "embed.cxx.julia",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.julia"
|
||||
}
|
||||
},
|
||||
"contentName": "meta.embedded.inline.cpp",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.cpp#root_context"
|
||||
},
|
||||
{
|
||||
"include": "#string_dollar_sign_interpolate"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(py)(\"\"\")",
|
||||
"beginCaptures": {
|
||||
@@ -491,33 +500,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(py)(\")",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.macro.julia"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.string.begin.julia"
|
||||
}
|
||||
},
|
||||
"end": "(\\w*)(\")",
|
||||
"name": "embed.python.julia",
|
||||
"endCaptures": {
|
||||
"2": {
|
||||
"name": "punctuation.definition.string.end.julia"
|
||||
}
|
||||
},
|
||||
"contentName": "meta.embedded.inline.python",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.python"
|
||||
},
|
||||
{
|
||||
"include": "#string_dollar_sign_interpolate"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(js)(\"\"\")",
|
||||
"beginCaptures": {
|
||||
@@ -545,33 +527,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(js)(\")",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.macro.julia"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.string.begin.julia"
|
||||
}
|
||||
},
|
||||
"end": "\"",
|
||||
"name": "embed.js.julia",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.julia"
|
||||
}
|
||||
},
|
||||
"contentName": "meta.embedded.inline.javascript",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.js"
|
||||
},
|
||||
{
|
||||
"include": "#string_dollar_sign_interpolate"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(R)(\"\"\")",
|
||||
"beginCaptures": {
|
||||
@@ -599,33 +554,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(R)(\")",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.macro.julia"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.string.begin.julia"
|
||||
}
|
||||
},
|
||||
"end": "\"",
|
||||
"name": "embed.R.julia",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.julia"
|
||||
}
|
||||
},
|
||||
"contentName": "meta.embedded.inline.r",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.r"
|
||||
},
|
||||
{
|
||||
"include": "#string_dollar_sign_interpolate"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(raw)(\"\"\")",
|
||||
"beginCaptures": {
|
||||
@@ -689,33 +617,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(sql)(\")",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.macro.julia"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.string.begin.julia"
|
||||
}
|
||||
},
|
||||
"end": "\"",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.julia"
|
||||
}
|
||||
},
|
||||
"name": "embed.sql.julia",
|
||||
"contentName": "meta.embedded.inline.sql",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.sql"
|
||||
},
|
||||
{
|
||||
"include": "#string_dollar_sign_interpolate"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "var\"\"\"",
|
||||
"end": "\"\"\"",
|
||||
@@ -726,66 +627,6 @@
|
||||
"end": "\"",
|
||||
"name": "constant.other.symbol.julia"
|
||||
},
|
||||
{
|
||||
"begin": "(md)(\"\"\")",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.macro.julia"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.string.begin.julia"
|
||||
}
|
||||
},
|
||||
"end": "\"\"\"",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.julia"
|
||||
}
|
||||
},
|
||||
"name": "embed.markdown.julia",
|
||||
"contentName": "meta.embedded.inline.markdown",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.md"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown.julia"
|
||||
},
|
||||
{
|
||||
"include": "#string_dollar_sign_interpolate"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(md)(\")",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.macro.julia"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.string.begin.julia"
|
||||
}
|
||||
},
|
||||
"end": "\"",
|
||||
"name": "embed.markdown.julia",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.julia"
|
||||
}
|
||||
},
|
||||
"contentName": "meta.embedded.inline.markdown",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.md"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown.julia"
|
||||
},
|
||||
{
|
||||
"include": "#string_dollar_sign_interpolate"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "^\\s?(doc)?(\"\"\")\\s?$",
|
||||
"beginCaptures": {
|
||||
@@ -1056,7 +897,7 @@
|
||||
"comment": "`punctuation.section.embedded`, `constant.escape`,\n& `meta.embedded.line` were considered but appear to have even spottier\nsupport among popular syntaxes.",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#nest_parens_and_self"
|
||||
"include": "#parentheses"
|
||||
},
|
||||
{
|
||||
"include": "$self"
|
||||
@@ -1065,22 +906,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"nest_parens_and_self": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\(",
|
||||
"end": "\\)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#nest_parens_and_self"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "$self"
|
||||
}
|
||||
]
|
||||
},
|
||||
"symbol": {
|
||||
"patterns": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user