diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2021-11-01 21:57:25 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2021-11-01 21:57:25 -0400 |
commit | eed8e74d18235bc61ed66435c935bbbc5337f953 (patch) | |
tree | 54f9f107a7bf0cdee9b795dfebbe1b84f4fb49d2 /src | |
parent | e70046f5e8a068369ac73aae47bf4aa7ec90d743 (diff) |
[EXEC] parseFile
Diffstat (limited to 'src')
-rw-r--r-- | src/exec.go | 2 | ||||
-rw-r--r-- | src/texec/worldbuilder.go | 12 |
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 } |