diff options
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() +} |