Standard library / go/parser

go/parser.AllErrors

Requests all parser errors, not only the first ten on distinct lines. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
const AllErrors Mode = 32

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/parser"  "go/token")
func main() {  _, e := parser.ParseFile(token.NewFileSet(), "demo.go", "package demo; var =", parser.AllErrors)  fmt.Println(e != nil)}
Go Reference