mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Code completion: add a lot of infrastructure code
* Added a mode in swift-ide-test to test code completion. Unlike c-index-test, the code completion token in tests is a real token -- we don't need to count lines and columns anymore. * Added support in lexer to produce a code completion token. * Added a parser interface to code completion. It is passed down from the libFrontend to the parser, but its functions are not called yet. * Added a sketch of the interface of code completion consumer and code completion results. Note: all this is not doing anything useful yet. Swift SVN r6128
This commit is contained in:
@@ -104,7 +104,8 @@ void swift::CompilerInstance::doIt() {
|
||||
parseIntoTranslationUnit(TU, BufferID, &Done, nullptr, &TheParser);
|
||||
assert(Done && "Parser returned early?");
|
||||
(void) Done;
|
||||
performDelayedParsing(TU, TheParser.get());
|
||||
performDelayedParsing(TU, TheParser.get(),
|
||||
Invocation->getCodeCompletionFactory());
|
||||
TheParser.reset(nullptr);
|
||||
}
|
||||
|
||||
@@ -135,5 +136,7 @@ void swift::CompilerInstance::doIt() {
|
||||
performTypeChecking(TU, CurTUElem);
|
||||
CurTUElem = TU->Decls.size();
|
||||
} while (!Done);
|
||||
performDelayedParsing(TU, TheParser.get(),
|
||||
Invocation->getCodeCompletionFactory());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user