summaryrefslogtreecommitdiff
path: root/source/slang/slang-language-server-semantic-tokens.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-06-07 14:57:35 -0700
committerGitHub <noreply@github.com>2022-06-07 14:57:35 -0700
commit01d0154ae90f5c587321d39b8fd8f82e2764f360 (patch)
tree3f441db0781e9fd4ebcccf4cbf7d743f4910c72d /source/slang/slang-language-server-semantic-tokens.cpp
parent0c64995ea28febcc7d38e1519da8d93391ce2e7d (diff)
Code review fixes for language server. (#2265)
* Code review fixes for language server. * Fix clang error. * update solution file Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-language-server-semantic-tokens.cpp')
-rw-r--r--source/slang/slang-language-server-semantic-tokens.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/slang-language-server-semantic-tokens.cpp b/source/slang/slang-language-server-semantic-tokens.cpp
index 42042e1c0..34c40d8fd 100644
--- a/source/slang/slang-language-server-semantic-tokens.cpp
+++ b/source/slang/slang-language-server-semantic-tokens.cpp
@@ -414,7 +414,7 @@ void iterateAST(UnownedStringSlice fileName, SourceManager* manager, SyntaxNode*
const char* kSemanticTokenTypes[] = {
"type", "enumMember", "variable", "parameter", "function", "property", "namespace"};
-static_assert(SLANG_COUNT_OF(kSemanticTokenTypes) == (int)SemanticTokenType::_NormalText, "kSemanticTokenTypes must match SemanticTokenType");
+static_assert(SLANG_COUNT_OF(kSemanticTokenTypes) == (int)SemanticTokenType::NormalText, "kSemanticTokenTypes must match SemanticTokenType");
SemanticToken _createSemanticToken(SourceManager* manager, SourceLoc loc, Name* name)
{
@@ -424,7 +424,7 @@ SemanticToken _createSemanticToken(SourceManager* manager, SourceLoc loc, Name*
token.col = (int)(humaneLoc.column - 1);
token.length =
name ? (int)(name->text.getLength()) : 0;
- token.type = SemanticTokenType::_NormalText;
+ token.type = SemanticTokenType::NormalText;
return token;
}
@@ -436,7 +436,7 @@ List<SemanticToken> getSemanticTokens(Linkage* linkage, Module* module, UnownedS
auto maybeInsertToken = [&](const SemanticToken& token)
{
if (token.line >= 0 && token.col >= 0 && token.length > 0 &&
- token.type != SemanticTokenType::_NormalText)
+ token.type != SemanticTokenType::NormalText)
result.add(token);
};