From f5ad652d6822876263f8f4dbe1a6f1dbe3fd035c Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 19 Oct 2022 22:54:24 -0400 Subject: [PATCH] Add external value to func and data sections --- analyzer/data-section.go | 6 +++++- analyzer/func-section.go | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/analyzer/data-section.go b/analyzer/data-section.go index 42aca03..0071dc4 100644 --- a/analyzer/data-section.go +++ b/analyzer/data-section.go @@ -9,6 +9,7 @@ type DataSection struct { sectionBase what Type argument Argument + external bool } // ToString returns all data stored within the data section, in string form. @@ -64,7 +65,10 @@ func (analyzer analysisOperation) analyzeDataSection () ( return } - if !inputSection.Argument().Nil() { + if inputSection.External() { + outputSection.external = true + + } else if !inputSection.Argument().Nil() { outputSection.argument, err = analyzer.analyzeArgument(inputSection.Argument()) if err != nil { return } diff --git a/analyzer/func-section.go b/analyzer/func-section.go index 34cabab..9998dbf 100644 --- a/analyzer/func-section.go +++ b/analyzer/func-section.go @@ -3,8 +3,7 @@ package analyzer // FuncSection represents a type definition section. type FuncSection struct { sectionBase - - + external bool } func (analyzer *analysisOperation) analyzeFuncSection () (