From eed8e74d18235bc61ed66435c935bbbc5337f953 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Mon, 1 Nov 2021 21:57:25 -0400 Subject: [EXEC] parseFile --- src/texec/worldbuilder.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/texec/worldbuilder.go') 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 } -- cgit v1.2.3