semantic tokens: ignore deprecated commands

This commit is contained in:
全卓 2022-12-14 16:19:17 +08:00
parent 186eea62fb
commit 801380ea92
1 changed files with 5 additions and 5 deletions

View File

@ -220,11 +220,11 @@ export class SemanticListener extends CMakeListener {
const cmdName: Token = ctx.ID().symbol; const cmdName: Token = ctx.ID().symbol;
const cmdNameLower: string = cmdName.text.toLowerCase(); const cmdNameLower: string = cmdName.text.toLowerCase();
if (cmdNameLower in builtinCmds) { if (cmdNameLower in builtinCmds) {
if ('deprecated' in builtinCmds[cmdNameLower]) { // if ('deprecated' in builtinCmds[cmdNameLower]) {
this._builder.push(cmdName.line - 1, cmdName.column, // this._builder.push(cmdName.line - 1, cmdName.column,
cmdName.text.length, tokenTypes.indexOf(TokenTypes.function), // cmdName.text.length, tokenTypes.indexOf(TokenTypes.function),
this.getModifiers([TokenModifiers.deprecated])); // this.getModifiers([TokenModifiers.deprecated]));
} // }
const sigs: string[] = builtinCmds[cmdNameLower]['sig']; const sigs: string[] = builtinCmds[cmdNameLower]['sig'];
const keywords = this.getCmdKeyWords(sigs); const keywords = this.getCmdKeyWords(sigs);