diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-02-13 00:08:59 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-02-13 00:08:59 -0500 |
commit | b74f28bf1e54dfcd7e679cbd688091d4b5f2642a (patch) | |
tree | faa1d553abdb2b2a59996003554cec9ec592931a /src/texec/worldbuilder.go | |
parent | b9a06c2ea9761f65f8aa85d86872faef60573e3e (diff) |
[EXEC] Pointers.
Diffstat (limited to 'src/texec/worldbuilder.go')
-rw-r--r-- | src/texec/worldbuilder.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/texec/worldbuilder.go b/src/texec/worldbuilder.go index 2f71e79..6a5fb33 100644 --- a/src/texec/worldbuilder.go +++ b/src/texec/worldbuilder.go @@ -51,7 +51,7 @@ func modDef(n tparse.Node, m *TModule) { t := getType(n.Sub[0]) s, vs := modDefVars(n.Sub[1], t) for i := 0; i < len(s); i++ { - m.Defs[s[i]] = vs[i] + m.Defs[s[i]] = &(vs[i]) } } @@ -94,7 +94,7 @@ func modDefStruct(n tparse.Node, m *TModule) { } } - m.Defs[name] = TVariable{tStruct, tvlist} + m.Defs[name] = &(TVariable{tStruct, tvlist}) } func modDefEnum(n tparse.Node, m *TModule) { @@ -103,9 +103,9 @@ func modDefEnum(n tparse.Node, m *TModule) { s, vs := modDefVars(n.Sub[2], t) out := TVariable{tEnum, make(VarMap)} for i := 0; i < len(s); i++ { - out.Data.(VarMap)[s[i]] = vs[i] + out.Data.(VarMap)[s[i]] = &(vs[i]) } - m.Defs[name] = out + m.Defs[name] = &(out) } // Parse a file and make an AST from it. |