summaryrefslogtreecommitdiff
path: root/src/texec/worldbuilder.go
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2021-11-02 13:57:27 -0400
committerKyle Gunger <kgunger12@gmail.com>2021-11-02 13:57:27 -0400
commit92b72f0357c553add6f010626e85268428ad5eb5 (patch)
tree0c1083a9fd61371eb0ac7f335691c6dc7c793ae5 /src/texec/worldbuilder.go
parente18043e5ac4e09870e9f5b1498e0ef954064ee49 (diff)
[EXEC] General changes, refactoring
Diffstat (limited to 'src/texec/worldbuilder.go')
-rw-r--r--src/texec/worldbuilder.go35
1 files changed, 32 insertions, 3 deletions
diff --git a/src/texec/worldbuilder.go b/src/texec/worldbuilder.go
index 8e5648f..e0fefa4 100644
--- a/src/texec/worldbuilder.go
+++ b/src/texec/worldbuilder.go
@@ -30,7 +30,36 @@ func parseFile(p string) tparse.Node {
return tparse.MakeTree(&(tokens), p)
}
-// BuildWorld creates a new TWorld by parsing a main file and recursively parsing imports.
-func BuildWorld(file string) TWorld {
- return nil
+func buildModule(module tparse.Node) TModule {
+ out := TModule{}
+
+ for n := 0 ; n < len(module.Sub) ; n++ {
+
+ switch module.Sub[n].Data.Type {
+ case 11:
+
+ case 10:
+
+ }
+ }
+
+ return out
+}
+
+// BuildRoot builds the root module, ready for eval
+func BuildRoot(file tparse.Node) TModule {
+ out := TModule{}
+
+ out.Files = append(out.Files, file)
+
+ for n := 0 ; n < len(file.Sub) ; n++ {
+
+ switch file.Sub[n].Data.Type {
+ case 11:
+
+ case 10:
+ }
+ }
+
+ return out
}