Compare commits
2 commits
a081de93ce
...
68b9855309
Author | SHA1 | Date | |
---|---|---|---|
68b9855309 | |||
86c7f7dd6a |
2 changed files with 3 additions and 4 deletions
|
@ -7,7 +7,7 @@ fn f() i32 {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn f2() i64 {
|
fn f2() i32 {
|
||||||
return 1301;
|
return 1301;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,11 +31,10 @@ pub const SymbolUnderlyingType = union(SymbolUnderlyingTypeEnum) {
|
||||||
Enum: []const u8,
|
Enum: []const u8,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Environment = std.StringHashMap(SymbolUnderlyingType);
|
|
||||||
pub const ScopeList = std.ArrayList(*Scope);
|
pub const ScopeList = std.ArrayList(*Scope);
|
||||||
pub const Scope = struct {
|
pub const Scope = struct {
|
||||||
parent: ?*Scope,
|
parent: ?*Scope,
|
||||||
env: Environment,
|
env: UnderlyingTypeMap,
|
||||||
|
|
||||||
/// Used for debug information.
|
/// Used for debug information.
|
||||||
children: ScopeList,
|
children: ScopeList,
|
||||||
|
@ -48,7 +47,7 @@ pub const Scope = struct {
|
||||||
|
|
||||||
scope.* = Scope{
|
scope.* = Scope{
|
||||||
.parent = parent,
|
.parent = parent,
|
||||||
.env = Environment.init(allocator),
|
.env = UnderlyingTypeMap.init(allocator),
|
||||||
.children = ScopeList.init(allocator),
|
.children = ScopeList.init(allocator),
|
||||||
.allocator = allocator,
|
.allocator = allocator,
|
||||||
.id = id,
|
.id = id,
|
||||||
|
|
Loading…
Reference in a new issue