Add external value to func and data sections

This commit is contained in:
Sasha Koshka 2022-10-19 22:54:24 -04:00
parent 5520994072
commit f5ad652d68
2 changed files with 6 additions and 3 deletions

View File

@ -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 }

View File

@ -3,8 +3,7 @@ package analyzer
// FuncSection represents a type definition section.
type FuncSection struct {
sectionBase
external bool
}
func (analyzer *analysisOperation) analyzeFuncSection () (