diff options
Diffstat (limited to 'source/slang/preprocessor.h')
| -rw-r--r-- | source/slang/preprocessor.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/source/slang/preprocessor.h b/source/slang/preprocessor.h index a3c5336f5..f16bc3929 100644 --- a/source/slang/preprocessor.h +++ b/source/slang/preprocessor.h @@ -7,14 +7,23 @@ namespace Slang { +struct CompileRequest; class DiagnosticSink; class ProgramSyntaxNode; +enum class IncludeResult +{ + Error, + NotFound, + FoundIncludeFile, + FoundAutoImportFile, +}; + // Callback interface for the preprocessor to use when looking // for files in `#include` directives. struct IncludeHandler { - virtual bool TryToFindIncludeFile( + virtual IncludeResult TryToFindIncludeFile( String const& pathToInclude, String const& pathIncludedFrom, String* outFoundPath, @@ -23,12 +32,13 @@ struct IncludeHandler // Take a string of source code and preprocess it into a list of tokens. TokenList preprocessSource( - String const& source, - String const& fileName, - DiagnosticSink* sink, - IncludeHandler* includeHandler, - Dictionary<String, String> defines, - ProgramSyntaxNode* syntax); + String const& source, + String const& fileName, + DiagnosticSink* sink, + IncludeHandler* includeHandler, + Dictionary<String, String> defines, + ProgramSyntaxNode* syntax, + CompileRequest* compileRequest); } // namespace Slang |
