feat: add typed WRN declarations

This commit is contained in:
2026-07-19 18:44:27 +05:30
parent 0d3ec79ee4
commit 94ae40d8bd
81 changed files with 942 additions and 241 deletions
+29 -2
View File
@@ -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"
}
}