Update grammars
This commit is contained in:
parent
83baef51fd
commit
fd8d4b09e1
|
@ -39,7 +39,7 @@ extensions.forEach(extension => updateGrammar(`extensions/${extension}`));
|
|||
// run integration tests
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
cp.spawn('.\scripts\test-integration.bat', [], { env: process.env, stdio: 'inherit' });
|
||||
cp.spawn('.\\scripts\\test-integration.bat', [], { env: process.env, stdio: 'inherit' });
|
||||
} else {
|
||||
cp.spawn('/bin/bash', ['./scripts/test-integration.sh'], { env: process.env, stdio: 'inherit' });
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar, version = 'mas
|
|||
}
|
||||
|
||||
try {
|
||||
fs.writeFileSync(dest, JSON.stringify(result, null, '\t'));
|
||||
fs.writeFileSync(dest, JSON.stringify(result, null, '\t').replace(/\n/g, '\r\n'));
|
||||
if (info) {
|
||||
console.log('Updated ' + path.basename(dest) + ' to ' + repoId + '@' + info.commitSha.substr(0, 7) + ' (' + info.commitDate.substr(0, 10) + ')');
|
||||
} else {
|
||||
|
|
|
@ -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/ionide/ionide-fsgrammar/commit/eb210da2bfea65a7dff46d22c97a0e9e410a9469",
|
||||
"version": "https://github.com/ionide/ionide-fsgrammar/commit/a20d836fa67d6daf81fd63e8baa97aa5e1516006",
|
||||
"name": "fsharp",
|
||||
"scopeName": "source.fsharp",
|
||||
"patterns": [
|
||||
|
@ -48,10 +48,13 @@
|
|||
"include": "#record_declaration"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
"include": "#records"
|
||||
},
|
||||
{
|
||||
"include": "#records"
|
||||
"include": "#strp_inlined"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
},
|
||||
{
|
||||
"include": "#cexprs"
|
||||
|
@ -61,10 +64,173 @@
|
|||
}
|
||||
],
|
||||
"repository": {
|
||||
"strp_inlined_body": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#anonymous_functions"
|
||||
},
|
||||
{
|
||||
"match": "(\\^[[:alpha:]0-9'._]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "keyword.fsharp",
|
||||
"match": "\\b(and|when|or)\\b"
|
||||
},
|
||||
{
|
||||
"begin": "(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(\\))",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#strp_inlined_body"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "(static member|member)\\s*([[:alpha:]0-9'`<>^._]+|``[[:alpha:]0-9' <>^._]+``)\\s*(:)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#constants"
|
||||
},
|
||||
{
|
||||
"include": "#strings"
|
||||
},
|
||||
{
|
||||
"include": "#chars"
|
||||
},
|
||||
{
|
||||
"include": "#double_tick"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
},
|
||||
{
|
||||
"include": "#text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"strp_inlined": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(\\))",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#strp_inlined_body"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"generic_declaration": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "([^<>,*()-])",
|
||||
"comments": "SRTP syntax support",
|
||||
"begin": "(:)\\s*(\\()\\s*(static member|member)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(\\))",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(\\))",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#member_declaration"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "(('|\\^)[[:alpha:]0-9'._]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#variables"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "keyword.fsharp",
|
||||
"match": "\\b(private|to|public|internal|function|yield!|yield|class|exception|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\\!|return\\!|return|interface|with|abstract|property|union|enum|member|try|finally|and|when|use|use\\!|struct|while|mutable)(?!')\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.fsharp",
|
||||
"match": ":"
|
||||
},
|
||||
{
|
||||
"include": "#constants"
|
||||
},
|
||||
{
|
||||
"match": "(('|\\^)[[:alpha:]0-9'._]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
|
@ -86,7 +252,7 @@
|
|||
},
|
||||
"patterns": [
|
||||
{
|
||||
"match": "([^<>,*()-])",
|
||||
"match": "(('|\\^)[[:alpha:]0-9'._]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
|
@ -101,6 +267,15 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "(?!when|and|or\\b)\\b([\\w0-9'`^._]+)",
|
||||
"comments": "Here we need the \\w modifier in order to check that the words isn't blacklisted",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
}
|
||||
|
@ -217,18 +392,23 @@
|
|||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#member_declaration"
|
||||
},
|
||||
{
|
||||
"match": "(:)(\\s*([?[:alpha:]0-9'`<>^._ ]+))*",
|
||||
"captures": {
|
||||
"begin": "(\\()",
|
||||
"end": "\\s*(?=(->))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#member_declaration"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#variables"
|
||||
|
@ -364,15 +544,18 @@
|
|||
"include": "#common_declaration"
|
||||
},
|
||||
{
|
||||
"match": "\\?{0,1}([[:alpha:]0-9'`^._ ]+)\\s*(:)(\\s*([?[:alpha:]0-9'`^._ ]+)){0,1}",
|
||||
"match": "(\\?{0,1})([[:alpha:]0-9'`^._ ]+)\\s*(:)(\\s*([[:alpha:]0-9'`^._ ]+)){0,1}",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.parameter.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.parameter.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
|
@ -391,11 +574,232 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"common_binding_definition": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#attributes"
|
||||
},
|
||||
{
|
||||
"comments": "SRTP syntax support",
|
||||
"begin": "(:)\\s*(\\()\\s*(static member|member)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(\\))\\s*((?=,)|(?=\\=))",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(\\^[[:alpha:]0-9'._]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#variables"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(:)\\s*(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(\\)\\s*(([?[:alpha:]0-9'`^._ ]*)))",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tuple_signature"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(:)\\s*(\\^[[:alpha:]0-9'._]+)\\s*(when)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(?=:)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.fsharp",
|
||||
"match": "\\b(and|when|or)\\b"
|
||||
},
|
||||
{
|
||||
"comment": "Because we first capture the keywords, we can capture what looks like a word and assume it's an entity definition",
|
||||
"match": "([[:alpha:]0-9'^._]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "keyword.symbol.fsharp",
|
||||
"match": "(\\(|\\))"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "(:)\\s*([?[:alpha:]0-9'`^._ ]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(->)\\s*(\\()?\\s*([?[:alpha:]0-9'`^._ ]+)*",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"begin": "(\\*)\\s*(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(\\)\\s*(([?[:alpha:]0-9'`^._ ]+))+)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tuple_signature"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "(\\*)(\\s*([?[:alpha:]0-9'`^._ ]+))*",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"begin": "(<(?![[:space:]]*\\)))",
|
||||
"beginComment": "The group (?![[:space:]]*\\) is for protection against overload operator. static member (<)",
|
||||
"end": "((?<!:)>)",
|
||||
"endComment": "The group (?<!:) prevent us from stopping on :> when using SRTP synthax",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#generic_declaration"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "({)",
|
||||
"end": "(})",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#record_signature"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#definition"
|
||||
},
|
||||
{
|
||||
"include": "#variables"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
}
|
||||
]
|
||||
},
|
||||
"definition": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "binding.fsharp",
|
||||
"begin": "\\b(val mutable|val|let mutable|let inline|let|member val|member|static member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?",
|
||||
"begin": "\\b(let mutable|let inline|let|member val|static member inline|static member|member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?",
|
||||
"end": "\\s*(with\\b|=|\\n+=|(?<=\\=))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
|
@ -421,140 +825,34 @@
|
|||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
"include": "#common_binding_definition"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "binding.fsharp",
|
||||
"begin": "\\b(static val mutable|val mutable|val)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?",
|
||||
"end": "\\n$",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.fsharp"
|
||||
},
|
||||
{
|
||||
"include": "#attributes"
|
||||
"2": {
|
||||
"name": "keyword.fsharp"
|
||||
},
|
||||
{
|
||||
"begin": "(:)\\s*(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(\\)\\s*(([?[:alpha:]0-9'`^._ ]+))+)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tuple_signature"
|
||||
}
|
||||
]
|
||||
"3": {
|
||||
"name": "support.function.attribute.fsharp"
|
||||
},
|
||||
{
|
||||
"match": "(:)\\s*([?[:alpha:]0-9'`^._ ]+)*",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
"4": {
|
||||
"name": "keyword.fsharp"
|
||||
},
|
||||
"5": {
|
||||
"name": "variable.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(->)\\s*(\\()?\\s*([?[:alpha:]0-9'`^._ ]+)*",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"begin": "(\\*)\\s*(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(\\)\\s*(([?[:alpha:]0-9'`^._ ]+))+)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tuple_signature"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "(\\*)(\\s*([?[:alpha:]0-9'`^._ ]+))*",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"begin": "(<(?![[:space:]]*\\)))",
|
||||
"end": "(>)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#generic_declaration"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "({)",
|
||||
"end": "(})",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#record_signature"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#variables"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
"include": "#common_binding_definition"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -613,7 +911,7 @@
|
|||
"patterns": [
|
||||
{
|
||||
"name": "keyword.fsharp",
|
||||
"match": "\\b(private|to|public|internal|function|yield!|yield|class|exception|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\\!|return\\!|return|interface|with|abstract|property|union|enum|member|try|finally|and|when|use|use\\!|struct|while|mutable)(?!')\\b"
|
||||
"match": "\\b(private|to|public|internal|function|yield!|yield|class|exception|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\\!|return\\!|return|interface|with|abstract|property|union|enum|member|try|finally|and|when|or|use|use\\!|struct|while|mutable)(?!')\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.symbol.fsharp",
|
||||
|
@ -817,8 +1115,15 @@
|
|||
"match": "\\(\\)"
|
||||
},
|
||||
{
|
||||
"name": "variable.parameter.fsharp",
|
||||
"match": "``[[:alpha:]0-9'`^:,._ ]+``|[[:alpha:]0-9'`<>^._ ]\\w*"
|
||||
"match": "(\\?{0,1})(``[[:alpha:]0-9'`^:,._ ]+``|[[:alpha:]0-9'`<>^._ ]\\w*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.parameter.fsharp"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -869,19 +1174,22 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"begin": "\\?{0,1}([[:alpha:]0-9'`^._ ]+)\\s*(:)(\\s*([?[:alpha:]0-9'`^._ ]+)(<))",
|
||||
"begin": "(\\?{0,1})([[:alpha:]0-9'`^._ ]+)\\s*(:)(\\s*([?[:alpha:]0-9'`^._ ]+)(<))",
|
||||
"end": "(>)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "variable.parameter.fsharp"
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
"name": "variable.parameter.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"4": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"5": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
},
|
||||
|
@ -909,13 +1217,26 @@
|
|||
"member_declaration": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(\\()",
|
||||
"end": "(\\))",
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#common_declaration"
|
||||
},
|
||||
{
|
||||
"comments": "SRTP syntax support",
|
||||
"begin": "(:)\\s*(\\()\\s*(static member|member)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(\\))\\s*((?=,)|(?=\\=))",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
|
@ -923,29 +1244,75 @@
|
|||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
"begin": "(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"end": "(\\))",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#member_declaration"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#common_declaration"
|
||||
},
|
||||
{
|
||||
"match": "\\?{0,1}([[:alpha:]0-9'`^._ ]+)\\s*(:{0,1})(\\s*([?[:alpha:]0-9'`<>^._ ]+)){0,1}",
|
||||
"match": "(\\^[[:alpha:]0-9'._]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.parameter.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#variables"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "(\\^[[:alpha:]0-9'._]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "keyword.fsharp",
|
||||
"match": "\\b(and|when|or)\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.symbol.fsharp",
|
||||
"match": "(\\(|\\))"
|
||||
},
|
||||
{
|
||||
"match": "(\\?{0,1})([[:alpha:]0-9'`^._]+|``[[:alpha:]0-9'`^:,._ ]+``)\\s*(:{0,1})(\\s*([?[:alpha:]0-9'`<>._ ]+)){0,1}",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.parameter.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -973,16 +1340,13 @@
|
|||
{
|
||||
"name": "record.fsharp",
|
||||
"begin": "\\b(type)[\\s]+(private|internal|public)?\\s*",
|
||||
"end": "\\s*((with)|((as)\\s*([[:alpha:]0-9']+))|(=)|[\\n=]|(\\(\\)))",
|
||||
"end": "\\s*((with)|((as)\\s+([[:alpha:]0-9']+))|(=)|[\\n=]|(\\(\\)))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.fsharp"
|
||||
},
|
||||
"3": {
|
||||
"name": "support.function.attribute.fsharp"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
|
@ -1013,18 +1377,82 @@
|
|||
"include": "#attributes"
|
||||
},
|
||||
{
|
||||
"match": "([[:alpha:]0-9'`^:,._]+|``[[:alpha:]0-9'`^:,._ ]+``)(<)",
|
||||
"match": "([[:alpha:]0-9'^._]+|``[[:alpha:]0-9'`^:,._ ]+``)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "\\s*(>)\\s*(private|internal|public)?",
|
||||
"begin": "(<)",
|
||||
"end": "((?<!:)>)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.fsharp"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(('|\\^)``[[:alpha:]0-9`^:,._ ]+``|('|\\^)[[:alpha:]0-9`^:._]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "keyword.fsharp",
|
||||
"match": "\\b(interface|with|abstract|and|when|or|not|struct|equality|comparison|unmanaged|delegate|enum)\\b"
|
||||
},
|
||||
{
|
||||
"begin": "(\\()",
|
||||
"end": "(\\))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(static member|member|new)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#common_binding_definition"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "([\\w0-9'`^._]+)",
|
||||
"comments": "Here we need the \\w modifier in order to check that the words isn't blacklisted",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "\\s*(private|internal|public)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
|
@ -1035,15 +1463,23 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"match": "([[:alpha:]0-9'`^._ ]+)",
|
||||
"captures": {
|
||||
"begin": "(\\()",
|
||||
"end": "\\s*(?=(=)|[\\n=]|(\\(\\))|(as))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.fsharp"
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#member_declaration"
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.symbol.fsharp"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#member_declaration"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
|
@ -1099,9 +1535,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#chars"
|
||||
},
|
||||
{
|
||||
"include": "#compiler_directives"
|
||||
},
|
||||
|
|
|
@ -110,7 +110,18 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": " age",
|
||||
"c": " ",
|
||||
"t": "source.fsharp record.fsharp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "age",
|
||||
"t": "source.fsharp record.fsharp variable.parameter.fsharp",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
|
|
|
@ -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/TypeScript-TmLanguage/commit/6e8a3830c29b6f29c06d2de091240e1a880f21aa",
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/a34cb117a38ac6f6eae0df88db984780c6b3df1e",
|
||||
"name": "JavaScript (with React support)",
|
||||
"scopeName": "source.js",
|
||||
"patterns": [
|
||||
|
@ -2676,7 +2676,7 @@
|
|||
"name": "keyword.operator.new.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
||||
"end": "(?<=\\))|(?=[;),}\\]:\\-\\+]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#paren-expression"
|
||||
|
|
|
@ -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/TypeScript-TmLanguage/commit/6e8a3830c29b6f29c06d2de091240e1a880f21aa",
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/a34cb117a38ac6f6eae0df88db984780c6b3df1e",
|
||||
"name": "JavaScript (with React support)",
|
||||
"scopeName": "source.js.jsx",
|
||||
"patterns": [
|
||||
|
@ -2676,7 +2676,7 @@
|
|||
"name": "keyword.operator.new.js.jsx"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
||||
"end": "(?<=\\))|(?=[;),}\\]:\\-\\+]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#paren-expression"
|
||||
|
|
|
@ -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/03cb9582024f477f93f3d27c46f7c084b2b14afe",
|
||||
"version": "https://github.com/emilast/vscode-logfile-highlighter/commit/30a19d24b9a0070b0fab5eef45f89c92e7cd71ea",
|
||||
"name": "Log file",
|
||||
"scopeName": "text.log",
|
||||
"patterns": [
|
||||
|
@ -49,7 +49,7 @@
|
|||
"name": "comment log.date"
|
||||
},
|
||||
{
|
||||
"match": "\\d{2}:\\d{2}(:\\d{2}([.,]\\d{3,})?)?(Z| ?[+-]\\d{2}:\\d{2})?\\b",
|
||||
"match": "\\d{1,2}:\\d{2}(:\\d{2}([.,]\\d{1,})?)?(Z| ?[+-]\\d{1,2}:\\d{2})?\\b",
|
||||
"name": "comment log.date"
|
||||
},
|
||||
{
|
||||
|
@ -69,7 +69,7 @@
|
|||
"name": "string log.string"
|
||||
},
|
||||
{
|
||||
"match": "(^|[^\\w])'[^']*'",
|
||||
"match": "(?<![\\w])'[^']*'",
|
||||
"name": "string log.string"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -2520,7 +2520,7 @@
|
|||
},
|
||||
{
|
||||
"c": "]",
|
||||
"t": "text.html.markdown meta.paragraph.markdown meta.link.reference.markdown",
|
||||
"t": "text.html.markdown meta.paragraph.markdown meta.link.reference.markdown punctuation.definition.string.end.markdown",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
|
|
@ -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/MagicStack/MagicPython/commit/b453f26ed856c9b16a053517c41207e3a72cc7d5",
|
||||
"version": "https://github.com/MagicStack/MagicPython/commit/8ff35b3e5fcde471fae62a57ea1ae1c7cd34c9fc",
|
||||
"name": "MagicPython",
|
||||
"scopeName": "source.python",
|
||||
"patterns": [
|
||||
|
@ -97,7 +97,8 @@
|
|||
},
|
||||
"docstring-statement": {
|
||||
"begin": "^(?=\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))",
|
||||
"end": "(?<=\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\")",
|
||||
"comment": "the string either terminates correctly or by the beginning of a new line (this is for single line docstrings that aren't terminated) AND it's not followed by another docstring",
|
||||
"end": "((?<=\\1)|^)(?!\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#docstring"
|
||||
|
@ -164,7 +165,7 @@
|
|||
{
|
||||
"name": "string.quoted.docstring.single.python",
|
||||
"begin": "(\\'|\\\")",
|
||||
"end": "(\\1)|((?<!\\\\)\\n)",
|
||||
"end": "(\\1)|(\\n)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.python"
|
||||
|
@ -190,7 +191,7 @@
|
|||
{
|
||||
"name": "string.quoted.docstring.raw.single.python",
|
||||
"begin": "([rR])(\\'|\\\")",
|
||||
"end": "(\\2)|((?<!\\\\)\\n)",
|
||||
"end": "(\\2)|(\\n)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.type.string.python"
|
||||
|
@ -247,7 +248,17 @@
|
|||
},
|
||||
{
|
||||
"name": "keyword.control.flow.python",
|
||||
"match": "(?x)\n \\b(?<!\\.)(\n as | async | continue | del | assert | break | finally | for\n | from | elif | else | if | except | pass | raise\n | return | try | while | with\n )\\b\n"
|
||||
"comment": "if `as` is eventually followed by `:` or line continuation\nit's probably control flow like:\n with foo as bar, \\\n Foo as Bar:\n try:\n do_stuff()\n except Exception as e:\n pass\n",
|
||||
"match": "\\b(?<!\\.)as\\b(?=.*[:\\\\])"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.import.python",
|
||||
"comment": "other legal use of `as` is in an import",
|
||||
"match": "\\b(?<!\\.)as\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.flow.python",
|
||||
"match": "(?x)\n \\b(?<!\\.)(\n async | continue | del | assert | break | finally | for\n | from | elif | else | if | except | pass | raise\n | return | try | while | with\n )\\b\n"
|
||||
},
|
||||
{
|
||||
"name": "storage.modifier.declaration.python",
|
||||
|
@ -847,40 +858,45 @@
|
|||
"match": "\\\\$"
|
||||
},
|
||||
"string-formatting": {
|
||||
"name": "constant.character.format.placeholder.other.python",
|
||||
"match": "(?x)\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsa%]\n"
|
||||
"name": "meta.format.percent.python",
|
||||
"match": "(?x)\n (\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsab%]\n )\n",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "constant.character.format.placeholder.other.python"
|
||||
}
|
||||
}
|
||||
},
|
||||
"string-brace-formatting": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.character.format.placeholder.other.python",
|
||||
"match": "(?x)\n (?:\n {{ | }}\n | (?:\n {\n \\w*? (\\.[[:alpha:]_]\\w*? | \\[[^\\]'\"]+\\])*?\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n",
|
||||
"name": "meta.format.brace.python",
|
||||
"match": "(?x)\n (\n {{ | }}\n | (?:\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n",
|
||||
"captures": {
|
||||
"2": {
|
||||
"name": "storage.type.format.python"
|
||||
"1": {
|
||||
"name": "constant.character.format.placeholder.other.python"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.type.format.python"
|
||||
},
|
||||
"4": {
|
||||
"name": "storage.type.format.python"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "constant.character.format.placeholder.other.python",
|
||||
"begin": "(?x)\n \\{\n \\w*? (\\.[[:alpha:]_]\\w*? | \\[[^\\]'\"]+\\])*?\n (![rsa])?\n (:)\n (?=[^'\"}\\n]*\\})\n",
|
||||
"end": "\\}",
|
||||
"beginCaptures": {
|
||||
"2": {
|
||||
"name": "storage.type.format.python"
|
||||
"name": "meta.format.brace.python",
|
||||
"match": "(?x)\n (\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n (:)\n [^'\"{}\\n]* (?:\n \\{ [^'\"}\\n]*? \\} [^'\"{}\\n]*\n )*\n }\n )\n",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "constant.character.format.placeholder.other.python"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.type.format.python"
|
||||
},
|
||||
"4": {
|
||||
"name": "storage.type.format.python"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?x) \\{ [^'\"}\\n]*? \\} (?=.*?\\})\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -899,25 +915,43 @@
|
|||
"match": "(}(?!}))"
|
||||
},
|
||||
"import": {
|
||||
"comment": "Import statements\n",
|
||||
"comment": "Import statements used to correctly mark `from`, `import`, and `as`\n",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?x)\n \\s* \\b(from)\\b \\s*(\\.+)\\s* (import)?\n",
|
||||
"captures": {
|
||||
"begin": "\\b(?<!\\.)(from)\\b(?=.+import)",
|
||||
"end": "$|(?=import)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.import.python"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.period.python"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.control.import.python"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "punctuation.separator.period.python",
|
||||
"match": "\\.+"
|
||||
},
|
||||
{
|
||||
"include": "#expression"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.import.python",
|
||||
"match": "\\b(?<!\\.)import\\b"
|
||||
"begin": "\\b(?<!\\.)(import)\\b",
|
||||
"end": "$",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.import.python"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.control.import.python",
|
||||
"match": "\\b(?<!\\.)as\\b"
|
||||
},
|
||||
{
|
||||
"include": "#expression"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1396,11 +1430,14 @@
|
|||
},
|
||||
"decorator": {
|
||||
"name": "meta.function.decorator.python",
|
||||
"begin": "(?x)\n ^\\s*\n (@) \\s* (?=[[:alpha:]_]\\w*)\n",
|
||||
"begin": "(?x)\n ^\\s*\n ((@)) \\s* (?=[[:alpha:]_]\\w*)\n",
|
||||
"end": "(?x)\n ( \\) )\n # trailing whitespace and comments are legal\n (?: (.*?) (?=\\s*(?:\\#|$)) )\n | (?=\\n|\\#)\n",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.function.decorator.python"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.decorator.python"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
|
@ -1430,7 +1467,12 @@
|
|||
},
|
||||
{
|
||||
"name": "entity.name.function.decorator.python",
|
||||
"match": "(?x)\n ([[:alpha:]_]\\w*) | \\.\n"
|
||||
"match": "(?x)\n ([[:alpha:]_]\\w*) | (\\.)\n",
|
||||
"captures": {
|
||||
"2": {
|
||||
"name": "punctuation.separator.period.python"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#line-continuation"
|
||||
|
@ -1512,25 +1554,23 @@
|
|||
]
|
||||
},
|
||||
"function-arguments": {
|
||||
"begin": "(?x)\n (?:\n (\\()\n (?:\\s*(\\*\\*|\\*))?\n )\n",
|
||||
"begin": "(\\()",
|
||||
"end": "(?=\\))(?!\\)\\s*\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.arguments.begin.python"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.unpacking.arguments.python"
|
||||
}
|
||||
},
|
||||
"contentName": "meta.function-call.arguments.python",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?x)\n (?:\n (,)\n (?:\\s*(\\*\\*|\\*))?\n )\n",
|
||||
"name": "punctuation.separator.arguments.python",
|
||||
"match": "(,)"
|
||||
},
|
||||
{
|
||||
"match": "(?x)\n (?:(?<=[,(])|^) \\s* (\\*{1,2})\n",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.arguments.python"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.unpacking.arguments.python"
|
||||
}
|
||||
}
|
||||
|
@ -1609,7 +1649,7 @@
|
|||
"patterns": [
|
||||
{
|
||||
"name": "support.function.builtin.python",
|
||||
"match": "(?x)\n (?<!\\.) \\b(\n __import__ | abs | all | any | ascii | bin | callable\n | chr | compile | copyright | credits | delattr | dir | divmod\n | enumerate | eval | exec | exit | filter | format | getattr\n | globals | hasattr | hash | help | hex | id | input\n | isinstance | issubclass | iter | len | license | locals | map\n | max | memoryview | min | next | oct | open | ord | pow | print\n | quit | range | reload | repr | reversed | round\n | setattr | sorted | sum | vars | zip\n )\\b\n"
|
||||
"match": "(?x)\n (?<!\\.) \\b(\n __import__ | abs | all | any | ascii | bin | breakpoint | callable\n | chr | compile | copyright | credits | delattr | dir | divmod\n | enumerate | eval | exec | exit | filter | format | getattr\n | globals | hasattr | hash | help | hex | id | input\n | isinstance | issubclass | iter | len | license | locals | map\n | max | memoryview | min | next | oct | open | ord | pow | print\n | quit | range | reload | repr | reversed | round\n | setattr | sorted | sum | vars | zip\n )\\b\n"
|
||||
},
|
||||
{
|
||||
"name": "variable.legacy.builtin.python",
|
||||
|
@ -1632,7 +1672,7 @@
|
|||
},
|
||||
"magic-variable-names": {
|
||||
"comment": "magic variables which a class/module may have.",
|
||||
"match": "(?x)\n \\b(\n __(?:\n all | bases | builtins | class | code | debug | defaults | dict\n | doc | file | func | kwdefaults | members\n | metaclass | methods | module | mro | name\n | qualname | self | signature | slots | subclasses\n | version | weakref | wrapped | annotations | classcell\n | spec | path | package | future | traceback\n )__\n )\\b\n",
|
||||
"match": "(?x)\n \\b(\n __(?:\n all | bases | builtins | class | class_getitem | code | debug\n | defaults | dict | doc | file | func | kwdefaults | members\n | metaclass | methods | module | mro | mro_entries | name\n | qualname | post_init | self | signature | slots | subclasses\n | version | weakref | wrapped | annotations | classcell\n | spec | path | package | future | traceback\n )__\n )\\b\n",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "support.variable.magic.python"
|
||||
|
@ -1650,8 +1690,15 @@
|
|||
]
|
||||
},
|
||||
"illegal-names": {
|
||||
"name": "keyword.control.flow.python",
|
||||
"match": "(?x)\n \\b(\n and | as | assert | async | await | break | class | continue | def\n | del | elif | else | except | exec | finally | for | from | global\n | if | import | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n | nonlocal | not | or | pass | raise | return | try | while | with\n | yield\n )\\b\n"
|
||||
"match": "(?x)\n \\b(?:\n (\n and | assert | async | await | break | class | continue | def\n | del | elif | else | except | finally | for | from | global\n | if | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n | nonlocal | not | or | pass | raise | return | try | while | with\n | yield\n ) | (\n as | import\n )\n )\\b\n",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.flow.python"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.import.python"
|
||||
}
|
||||
}
|
||||
},
|
||||
"special-variables": {
|
||||
"match": "(?x)\n \\b (?<!\\.) (?:\n (self) | (cls)\n )\\b\n",
|
||||
|
@ -4537,7 +4584,7 @@
|
|||
},
|
||||
"string-quoted-single-line": {
|
||||
"name": "string.quoted.single.python",
|
||||
"begin": "(\\b[rR](?=[uU]))?([uU])?((['\"]))",
|
||||
"begin": "(?:\\b([rR])(?=[uU]))?([uU])?((['\"]))",
|
||||
"end": "(\\3)|((?<!\\\\)\\n)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
|
@ -4711,7 +4758,7 @@
|
|||
},
|
||||
"string-quoted-multi-line": {
|
||||
"name": "string.quoted.multi.python",
|
||||
"begin": "(\\b[rR](?=[uU]))?([uU])?('''|\"\"\")",
|
||||
"begin": "(?:\\b([rR])(?=[uU]))?([uU])?('''|\"\"\")",
|
||||
"end": "(\\3)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
|
|
|
@ -573,7 +573,7 @@
|
|||
},
|
||||
{
|
||||
"c": "{{",
|
||||
"t": "source.python string.quoted.single.python constant.character.format.placeholder.other.python",
|
||||
"t": "source.python string.quoted.single.python meta.format.brace.python constant.character.format.placeholder.other.python",
|
||||
"r": {
|
||||
"dark_plus": "constant.character: #569CD6",
|
||||
"light_plus": "constant.character: #0000FF",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[
|
||||
{
|
||||
"c": "from",
|
||||
"t": "source.python keyword.control.flow.python",
|
||||
"t": "source.python keyword.control.import.python",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
|
@ -5072,7 +5072,7 @@
|
|||
},
|
||||
{
|
||||
"c": "*",
|
||||
"t": "source.python meta.function-call.python keyword.operator.unpacking.arguments.python",
|
||||
"t": "source.python meta.function-call.python meta.function-call.arguments.python keyword.operator.unpacking.arguments.python",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
|
|
|
@ -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/TypeScript-TmLanguage/commit/6e8a3830c29b6f29c06d2de091240e1a880f21aa",
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/a34cb117a38ac6f6eae0df88db984780c6b3df1e",
|
||||
"name": "TypeScript",
|
||||
"scopeName": "source.ts",
|
||||
"patterns": [
|
||||
|
@ -2673,7 +2673,7 @@
|
|||
"name": "keyword.operator.new.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
||||
"end": "(?<=\\))|(?=[;),}\\]:\\-\\+]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#paren-expression"
|
||||
|
|
|
@ -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/TypeScript-TmLanguage/commit/6e8a3830c29b6f29c06d2de091240e1a880f21aa",
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/a34cb117a38ac6f6eae0df88db984780c6b3df1e",
|
||||
"name": "TypeScriptReact",
|
||||
"scopeName": "source.tsx",
|
||||
"patterns": [
|
||||
|
@ -2676,7 +2676,7 @@
|
|||
"name": "keyword.operator.new.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
||||
"end": "(?<=\\))|(?=[;),}\\]:\\-\\+]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#paren-expression"
|
||||
|
|
|
@ -6,11 +6,11 @@ pushd %~dp0\..
|
|||
set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,5%
|
||||
|
||||
:: Tests in the extension host
|
||||
call .\scripts\code.bat %~dp0\..\extensions\vscode-api-tests\testWorkspace --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\singlefolder-tests --disableExtensions --user-data-dir=%VSCODEUSERDATADIR%
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
REM call .\scripts\code.bat %~dp0\..\extensions\vscode-api-tests\testWorkspace --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\singlefolder-tests --disableExtensions --user-data-dir=%VSCODEUSERDATADIR%
|
||||
REM if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
call .\scripts\code.bat %~dp0\..\extensions\vscode-api-tests\testworkspace.code-workspace --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\workspace-tests --disableExtensions --user-data-dir=%VSCODEUSERDATADIR%
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
REM call .\scripts\code.bat %~dp0\..\extensions\vscode-api-tests\testworkspace.code-workspace --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\workspace-tests --disableExtensions --user-data-dir=%VSCODEUSERDATADIR%
|
||||
REM if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
call .\scripts\code.bat %~dp0\..\extensions\vscode-colorize-tests\test --extensionDevelopmentPath=%~dp0\..\extensions\vscode-colorize-tests --extensionTestsPath=%~dp0\..\extensions\vscode-colorize-tests\out --disableExtensions --user-data-dir=%VSCODEUSERDATADIR%
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
|
Loading…
Reference in a new issue