diff options
Diffstat (limited to 'source/compiler-core')
| -rw-r--r-- | source/compiler-core/slang-json-rpc-connection.h | 2 | ||||
| -rw-r--r-- | source/compiler-core/slang-lexer.cpp | 5 | ||||
| -rw-r--r-- | source/compiler-core/slang-token-defs.h | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/source/compiler-core/slang-json-rpc-connection.h b/source/compiler-core/slang-json-rpc-connection.h index 07b7cc347..18749229c 100644 --- a/source/compiler-core/slang-json-rpc-connection.h +++ b/source/compiler-core/slang-json-rpc-connection.h @@ -148,6 +148,8 @@ public: /// it will become invalid in most usage scenarios. PersistentJSONValue getPersistentValue(const JSONValue& value) { return PersistentJSONValue(value, &m_container, SourceLoc()); } + HTTPPacketConnection* getUnderlyingConnection() { return m_connection.Ptr(); } + /// Dtor ~JSONRPCConnection() { disconnect(); } 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())); } diff --git a/source/compiler-core/slang-token-defs.h b/source/compiler-core/slang-token-defs.h index fdbe81e17..45b4912e7 100644 --- a/source/compiler-core/slang-token-defs.h +++ b/source/compiler-core/slang-token-defs.h @@ -90,6 +90,8 @@ PUNCTUATION(PoundPound, "##") PUNCTUATION(Scope, "::") +PUNCTUATION(CompletionRequest, "#?") + #undef PUNCTUATION // Un-define the `TOKEN` macro so that client doesn't have to |
