func parse(file *os.File) { var ( token_list *lexer.Token ast *parser.AST ) token_list = lexer.Lex(file) ast = parser.Parse(token_list) fmt.Println(ast) }
func lex(file *os.File) { var ( token_list *lexer.Token ) token_list = lexer.Lex(file) current_token := token_list /* first_token := token_list */ for { fmt.Println(current_token.Type, string(current_token.Content)) current_token = current_token.Next if current_token == nil { break } } }