From b301c93753eaddb4571999f209cb8c1faa2fe205 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 6 Feb 2024 01:03:42 -0800 Subject: Unify GLSL and HLSL buffer block parsing. (#3552) * Unify GLSL and HLSL buffer block parsing. Automatic GLSL module recognition. * Fix. --- source/slang/slang-preprocessor.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-preprocessor.h') diff --git a/source/slang/slang-preprocessor.h b/source/slang/slang-preprocessor.h index c37fd1607..d8698cd01 100644 --- a/source/slang/slang-preprocessor.h +++ b/source/slang/slang-preprocessor.h @@ -13,6 +13,8 @@ class DiagnosticSink; class Linkage; struct PreprocessorContentAssistInfo; +enum class SourceLanguage : SlangSourceLanguageIntegral; + namespace preprocessor { struct Preprocessor; @@ -62,7 +64,8 @@ struct PreprocessorDesc /// Take a source `file` and preprocess it into a list of tokens. TokenList preprocessSource( SourceFile* file, - PreprocessorDesc const& desc); + PreprocessorDesc const& desc, + SourceLanguage& outDetectedLanguage); /// Convenience wrapper for `preprocessSource` when a `Linkage` is available TokenList preprocessSource( @@ -71,6 +74,7 @@ TokenList preprocessSource( IncludeSystem* includeSystem, Dictionary const& defines, Linkage* linkage, + SourceLanguage& outDetectedLanguage, PreprocessorHandler* handler = nullptr); // The following functions are intended to be used inside of implementations -- cgit v1.2.3