summaryrefslogtreecommitdiff
path: root/source/slang/decl-defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/decl-defs.h')
-rw-r--r--source/slang/decl-defs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/decl-defs.h b/source/slang/decl-defs.h
index 0480eb934..10dcefe19 100644
--- a/source/slang/decl-defs.h
+++ b/source/slang/decl-defs.h
@@ -240,6 +240,14 @@ SIMPLE_SYNTAX_CLASS(FuncDecl, FunctionDeclBase)
// that provides a scope for some number of declarations.
SYNTAX_CLASS(ModuleDecl, ContainerDecl)
FIELD(RefPtr<Scope>, scope)
+
+ // The API-level module that this declaration belong to.
+ //
+ // This field allows lookup of the `Module` based on a
+ // declaration nested under a `ModuleDecl` by following
+ // its chain of parents.
+ //
+ RAW(Module* module = nullptr;)
END_SYNTAX_CLASS()
SYNTAX_CLASS(ImportDecl, Decl)