// The compiler package main import ( "log" "os" ) func main() { if len(os.Args) != 2 { log.Fatalln("Usage: " + os.Args[0] + " ") } content, err := os.ReadFile(os.Args[1]) if err != nil { log.Fatalln("Cannot open input file.", err) } ast, err := lexer(string(content)) if err != nil { log.Fatalln(err) } log.Printf("%+#v\n", ast) }