Ejemplo n.º 1
0
func expectToken(found token, expected string, s *scanner.Scanner) {
	if found.tokentype != expected {
		fmt.Println("On line ", s.LineNumber(), "; Expected ", expected, " found ", found.tokentype, " with value '", found.value, "'")
		os.Exit(1)
	}

}