Skip to content

Commit 17004ec

Browse files
authored
Mark SemanticTokenTypes and SemanticTokenModifiers as open set (#1010)
1 parent 41d5002 commit 17004ec

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

protocol/metaModel.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12597,6 +12597,7 @@
1259712597
"since": "3.17.0"
1259812598
}
1259912599
],
12600+
"supportsCustomValues": true,
1260012601
"documentation": "A set of predefined token types. This set is not fixed\nan clients can specify additional token types via the\ncorresponding client capabilities.\n\n@since 3.16.0",
1260112602
"since": "3.16.0"
1260212603
},
@@ -12648,6 +12649,7 @@
1264812649
"value": "defaultLibrary"
1264912650
}
1265012651
],
12652+
"supportsCustomValues": true,
1265112653
"documentation": "A set of predefined token modifiers. This set is not fixed\nan clients can specify additional token types via the\ncorresponding client capabilities.\n\n@since 3.16.0",
1265212654
"since": "3.16.0"
1265312655
},

tools/src/visitor.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,9 @@ export default class Visitor {
941941
? { kind: 'base', name: 'uinteger' }
942942
: { kind: 'base', name: enumBaseType };
943943
const result: Enumeration = { name: name, type: type, values: entries };
944+
if (name === 'SemanticTokenTypes' || name === 'SemanticTokenModifiers') {
945+
result.supportsCustomValues = true;
946+
}
944947
const declaration = this.getDeclaration(symbol, ts.SyntaxKind.EnumDeclaration);
945948
if (declaration !== undefined) {
946949
this.fillDocProperties(declaration, result);

0 commit comments

Comments
 (0)