diff options
author | Kyle Gunger <corechg@gmail.com> | 2020-06-28 14:30:45 -0400 |
---|---|---|
committer | Kyle Gunger <corechg@gmail.com> | 2020-06-28 14:30:45 -0400 |
commit | 8f9cf0d4856bb53009bb58b53a42e21e2cd1e947 (patch) | |
tree | b022091a0c3105e2da54b9dc16e5f55852b788f3 /src/main.go |
[Initial parser] Upload existing
Diffstat (limited to 'src/main.go')
-rw-r--r-- | src/main.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main.go b/src/main.go new file mode 100644 index 0000000..ec3b14b --- /dev/null +++ b/src/main.go @@ -0,0 +1,24 @@ +package main + +import "fmt" +import "tparse" +import "flag" +import "os" + +func main() { + inputFile := flag.String("in", "", "The file to parse") + outputFile := flag.String("out", "out.tnp", "The file to store the parse in") + + flag.Parse() + + fd, err := os.Create(*outputFile) + + if err != nil { + fmt.Println(err.Error()) + return + } + + fd.WriteString(fmt.Sprint(tparse.ParseFile(*inputFile))) + + fd.Close() +} |