Added optional "pretty" printing.

This commit is contained in:
Marvin Blum
2015-10-10 15:57:35 +02:00
parent 765a3fde5b
commit 18ab469808
5 changed files with 73 additions and 55 deletions

View File

@@ -6,11 +6,15 @@ import (
"io/ioutil"
)
func usage() {
fmt.Println("Usage: asl [-v|-pretty]")
}
func main() {
// read test file
code, _ := ioutil.ReadFile("in/simple.asl")
token := asl.Tokenize(code)
out := asl.Parse(token)
out := asl.Parse(token, true)
fmt.Println("OUTPUT:\n"+out) // TODO: remove
}