summaryrefslogtreecommitdiff
path: root/source/compiler-core/slang-lexer.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-06-22 19:58:34 -0700
committerGitHub <noreply@github.com>2022-06-22 19:58:34 -0700
commit07a380d72a13899a84cbdc35692be7a3d9246dcb (patch)
tree68e77f2e9682b3b7c3debd745604a494439e5b25 /source/compiler-core/slang-lexer.cpp
parente5a75563a1ba2e378353af8b937b8b7bb0fe2c2b (diff)
More Language Server Improvements. (#2289)
Diffstat (limited to 'source/compiler-core/slang-lexer.cpp')
-rw-r--r--source/compiler-core/slang-lexer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/compiler-core/slang-lexer.cpp b/source/compiler-core/slang-lexer.cpp
index d149a88bc..fd0255575 100644
--- a/source/compiler-core/slang-lexer.cpp
+++ b/source/compiler-core/slang-lexer.cpp
@@ -1167,6 +1167,9 @@ namespace Slang
switch(_peek(lexer))
{
case '#': _advance(lexer); return TokenType::PoundPound;
+
+ case '?': _advance(lexer); return TokenType::CompletionRequest;
+
default:
return TokenType::Pound;
}
@@ -1337,7 +1340,7 @@ namespace Slang
}
}
- if (tokenType == TokenType::Identifier)
+ if (tokenType == TokenType::Identifier || tokenType == TokenType::CompletionRequest)
{
token.setName(m_namePool->getName(token.getContent()));
}