mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[incrParse] Support incremental parsing for edited files
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "swift/Migrator/MigratorOptions.h"
|
||||
#include "swift/Parse/CodeCompletionCallbacks.h"
|
||||
#include "swift/Parse/Parser.h"
|
||||
#include "swift/Parse/SyntaxParsingCache.h"
|
||||
#include "swift/Sema/SourceLoader.h"
|
||||
#include "swift/Serialization/Validation.h"
|
||||
#include "swift/Subsystems.h"
|
||||
@@ -68,6 +69,9 @@ class CompilerInvocation {
|
||||
MigratorOptions MigratorOpts;
|
||||
SILOptions SILOpts;
|
||||
IRGenOptions IRGenOpts;
|
||||
/// The \c SyntaxParsingCache to use when parsing the main file of this
|
||||
/// invocation
|
||||
SyntaxParsingCache *MainFileSyntaxParsingCache = nullptr;
|
||||
|
||||
llvm::MemoryBuffer *CodeCompletionBuffer = nullptr;
|
||||
|
||||
@@ -217,6 +221,14 @@ public:
|
||||
IRGenOptions &getIRGenOptions() { return IRGenOpts; }
|
||||
const IRGenOptions &getIRGenOptions() const { return IRGenOpts; }
|
||||
|
||||
void setMainFileSyntaxParsingCache(SyntaxParsingCache *Cache) {
|
||||
MainFileSyntaxParsingCache = Cache;
|
||||
}
|
||||
|
||||
SyntaxParsingCache *getMainFileSyntaxParsingCache() const {
|
||||
return MainFileSyntaxParsingCache;
|
||||
}
|
||||
|
||||
void setParseStdlib() {
|
||||
FrontendOpts.ParseStdlib = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user