summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/exec.go2
-rw-r--r--src/texec/worldbuilder.go12
2 files changed, 11 insertions, 3 deletions
diff --git a/src/exec.go b/src/exec.go
index dbdbf72..79584ce 100644
--- a/src/exec.go
+++ b/src/exec.go
@@ -28,5 +28,5 @@ func main() {
world := texec.BuildWorld(*inputFile)
- texec.EvalTNSL(&world, *progFlags)
+ texec.EvalTNSL(world, *progFlags)
} \ No newline at end of file
diff --git a/src/texec/worldbuilder.go b/src/texec/worldbuilder.go
index 54f87f3..8e5648f 100644
--- a/src/texec/worldbuilder.go
+++ b/src/texec/worldbuilder.go
@@ -16,13 +16,21 @@
package texec
-import "tparse"
+import (
+ "tparse"
+ "path"
+)
/**
worldbuilder.go - take in a file name and construct a TWorld based on it.
*/
+func parseFile(p string) tparse.Node {
+ tokens := tparse.TokenizeFile(p)
+ return tparse.MakeTree(&(tokens), p)
+}
+
// BuildWorld creates a new TWorld by parsing a main file and recursively parsing imports.
-func BuildWorld(file string) *TWorld {
+func BuildWorld(file string) TWorld {
return nil
}