summaryrefslogtreecommitdiff
path: root/source/slang/slang-preprocessor.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-02-06 01:03:42 -0800
committerGitHub <noreply@github.com>2024-02-06 01:03:42 -0800
commitb301c93753eaddb4571999f209cb8c1faa2fe205 (patch)
tree72fef2e499abecad0dda5ba2347e5890346ac173 /source/slang/slang-preprocessor.h
parent23c65b873f8002b74d60f61cacb3614da60e078d (diff)
Unify GLSL and HLSL buffer block parsing. (#3552)
* Unify GLSL and HLSL buffer block parsing. Automatic GLSL module recognition. * Fix.
Diffstat (limited to 'source/slang/slang-preprocessor.h')
-rw-r--r--source/slang/slang-preprocessor.h6
1 files changed, 5 insertions, 1 deletions
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<String, String> const& defines,
Linkage* linkage,
+ SourceLanguage& outDetectedLanguage,
PreprocessorHandler* handler = nullptr);
// The following functions are intended to be used inside of implementations