Add Unit() method to semantic tree

This commit is contained in:
Sasha Koshka 2024-04-21 12:24:18 -04:00
parent cc5173dd52
commit c13c4caacb
1 changed files with 5 additions and 0 deletions

View File

@ -39,6 +39,11 @@ func (this *Tree) Analyze (
return this.analyzeDeclarations()
}
// Unit returns the root unit in this tree.
func (this *Tree) Unit () uuid.UUID {
return this.unit
}
func (this *Tree) assembleRawMaps () error {
for _, declaration := range this.ast.Declarations {
switch declaration := declaration.(type) {