summaryrefslogtreecommitdiffstats
path: root/source/compiler-core
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler-core')
-rw-r--r--source/compiler-core/slang-source-loc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/compiler-core/slang-source-loc.h b/source/compiler-core/slang-source-loc.h
index 674ed2076..b52f2e50d 100644
--- a/source/compiler-core/slang-source-loc.h
+++ b/source/compiler-core/slang-source-loc.h
@@ -331,6 +331,12 @@ public:
m_sourceMapKind = sourceMapKind;
}
+ /// Set the source file as an included file
+ void setIncludedFile() { m_included = true; }
+
+ /// Check if the source file is an included file
+ bool isIncludedFile() { return m_included; }
+
/// Ctor
SourceFile(SourceManager* sourceManager, const PathInfo& pathInfo, size_t contentSize);
/// Dtor
@@ -360,6 +366,9 @@ protected:
ComPtr<IBoxValue<SourceMap>> m_sourceMap;
// What kind of source map it is (if there is one)
SourceMapKind m_sourceMapKind = SourceMapKind::Normal;
+
+ // Indicate if the source file is an included file
+ bool m_included = false;
};
enum class SourceLocType