Skip to content

Commit 8b97b47

Browse files
fix: remove union typedef (#28)
BREAKING CHANGE: The `union` type has been removed from the WIT grammar. Unions were [removed](WebAssembly/component-model#237) from WIT and the Component Model recently. Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
1 parent a043f00 commit 8b97b47

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

src/extension.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const keywords = [
3737
"resource",
3838
"static",
3939
"type",
40-
"union",
4140
"use",
4241
"variant",
4342
"with",

syntaxes/wit.tmLanguage.json

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,6 @@
577577
{
578578
"include": "#record"
579579
},
580-
{
581-
"include": "#union"
582-
},
583580
{
584581
"include": "#flags"
585582
},
@@ -897,42 +894,6 @@
897894
}
898895
]
899896
},
900-
"union": {
901-
"name": "meta.union-items.wit",
902-
"comment": "Syntax for WIT like `union \"id\" {`",
903-
"begin": "\\s*\\b(union)\\b\\s+((?<![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\{)\\s*",
904-
"beginCaptures": {
905-
"1": {
906-
"name": "keyword.other.union.union-items.wit"
907-
},
908-
"2": {
909-
"name": "entity.name.type.declaration.id.union-items.wit"
910-
},
911-
"7": {
912-
"name": "punctuation.brackets.curly.begin.wit"
913-
}
914-
},
915-
"patterns": [
916-
{
917-
"include": "#comment"
918-
},
919-
{
920-
"name": "meta.types.union-cases.wit",
921-
"include": "#types"
922-
},
923-
{
924-
"name": "punctuation.comma.wit",
925-
"match": "\\s*(\\,)"
926-
}
927-
],
928-
"end": "\\s*(\\})\\s*",
929-
"applyEndPatternLast": 1,
930-
"endCaptures": {
931-
"1": {
932-
"name": "punctuation.brackets.curly.end.wit"
933-
}
934-
}
935-
},
936897
"types": {
937898
"name": "meta.ty.wit",
938899
"comment": "Syntax for WIT types corresponding to the interface types specification",

0 commit comments

Comments
 (0)