mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Code completion: insert a zero character into the buffer to mark the code
completion token This is required to handle cases like fooObject.#^A^#.bar where code completion is invoked inside the ".." token. Previously, the token would not be split and the lexer would produce an incorrect tokenization for this case. Now we produce ".", tok::code_complete, ".". Swift SVN r6635
This commit is contained in:
@@ -32,6 +32,7 @@ std::string swift::code_completion::removeCodeCompletionTokens(
|
||||
StringRef(Ptr, Token.size()) == Token) {
|
||||
Ptr += Token.size() - 1;
|
||||
*CompletionOffset = CleanFile.size();
|
||||
CleanFile += '\0';
|
||||
continue;
|
||||
}
|
||||
if (C == '#' && Ptr <= End - 2 && Ptr[1] == '^') {
|
||||
|
||||
Reference in New Issue
Block a user