Skip to content

Commit c61815f

Browse files
committed
feat: added global scope HIR version
1 parent cdda6e6 commit c61815f

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

compiler/astoir_hir/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
pub mod ctx;
55
pub mod nodes;
66
pub mod resolve;
7+
pub mod scope;
78
pub mod structs;

compiler/astoir_hir/src/scope.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//! HIR version of the global scope in order to store descriptors and implementations
2+
3+
use compiler_typing::TypedGlobalScope;
4+
5+
use crate::{ctx::HIRFunction, nodes::HIRNode};
6+
7+
/// The HIR version of `GlobalScopeStorage`. Contains the descriptors and implementations.
8+
/// Every function to append, gather will automatically handle descriptors and implementations if needed
9+
pub struct HIRGlobalScopeStorage {
10+
pub scope: TypedGlobalScope,
11+
pub descriptors: Vec<HIRFunction>,
12+
pub implementations: Vec<Box<HIRNode>>,
13+
}

0 commit comments

Comments
 (0)