Skip to content

Commit

Permalink
fix: remove union typedef (#28)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tschneidereit authored Sep 4, 2023
1 parent a043f00 commit 8b97b47
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
1 change: 0 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const keywords = [
"resource",
"static",
"type",
"union",
"use",
"variant",
"with",
Expand Down
39 changes: 0 additions & 39 deletions syntaxes/wit.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,6 @@
{
"include": "#record"
},
{
"include": "#union"
},
{
"include": "#flags"
},
Expand Down Expand Up @@ -897,42 +894,6 @@
}
]
},
"union": {
"name": "meta.union-items.wit",
"comment": "Syntax for WIT like `union \"id\" {`",
"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*",
"beginCaptures": {
"1": {
"name": "keyword.other.union.union-items.wit"
},
"2": {
"name": "entity.name.type.declaration.id.union-items.wit"
},
"7": {
"name": "punctuation.brackets.curly.begin.wit"
}
},
"patterns": [
{
"include": "#comment"
},
{
"name": "meta.types.union-cases.wit",
"include": "#types"
},
{
"name": "punctuation.comma.wit",
"match": "\\s*(\\,)"
}
],
"end": "\\s*(\\})\\s*",
"applyEndPatternLast": 1,
"endCaptures": {
"1": {
"name": "punctuation.brackets.curly.end.wit"
}
}
},
"types": {
"name": "meta.ty.wit",
"comment": "Syntax for WIT types corresponding to the interface types specification",
Expand Down

0 comments on commit 8b97b47

Please sign in to comment.