feat: add typed WRN declarations
This commit is contained in:
@@ -49,6 +49,9 @@
|
||||
{
|
||||
"include": "#seo-block"
|
||||
},
|
||||
{
|
||||
"include": "#types-block"
|
||||
},
|
||||
{
|
||||
"include": "#props-block"
|
||||
},
|
||||
@@ -93,7 +96,7 @@
|
||||
}
|
||||
},
|
||||
"state-decl": {
|
||||
"begin": "\\b(state)\\b\\s+([A-Za-z_$][A-Za-z0-9_$]*)\\s*(=)",
|
||||
"begin": "\\b(state)\\b\\s+([A-Za-z_$][A-Za-z0-9_$]*)(?:\\s*(:)\\s*([^=\\r\\n]+?))?\\s*(=)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.wrn"
|
||||
@@ -102,6 +105,12 @@
|
||||
"name": "variable.other.wrn"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.separator.type.wrn"
|
||||
},
|
||||
"4": {
|
||||
"name": "storage.type.wrn"
|
||||
},
|
||||
"5": {
|
||||
"name": "keyword.operator.assignment.wrn"
|
||||
}
|
||||
},
|
||||
@@ -113,6 +122,18 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"types-block": {
|
||||
"begin": "\\b(types)\\b\\s*(\\{)",
|
||||
"beginCaptures": {
|
||||
"1": { "name": "keyword.control.wrn" },
|
||||
"2": { "name": "punctuation.definition.block.begin.wrn" }
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": { "name": "punctuation.definition.block.end.wrn" }
|
||||
},
|
||||
"patterns": [{ "include": "source.ts" }]
|
||||
},
|
||||
"props-block": {
|
||||
"begin": "\\b(props)\\b\\s*(\\{)",
|
||||
"beginCaptures": {
|
||||
@@ -134,12 +155,18 @@
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"match": "\\b([A-Za-z_$][A-Za-z0-9_$]*)\\s*(=)",
|
||||
"match": "\\b([A-Za-z_$][A-Za-z0-9_$]*)(?:\\s*(:)\\s*([^=\\r\\n]+?))?\\s*(=|$)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.parameter.wrn"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.type.wrn"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.type.wrn"
|
||||
},
|
||||
"4": {
|
||||
"name": "keyword.operator.assignment.wrn"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user