Versions in this module Expand all Collapse all v1 v1.7.2 Nov 3, 2020 Changes in this version + var ErrInvalidSource = errors.New("parse failed: invalid proto source") + var ErrLookupImportAndProtoSet = errors.New("both LookupImport and LookupImportProto set") + var ErrNoSyntax = errors.New("no syntax specified; defaulting to proto2 syntax") + func ResolveFilenames(importPaths []string, fileNames ...string) ([]string, error) + type ErrorReporter func(err ErrorWithPos) error + type ErrorWithPos interface + GetPosition func() SourcePos + Unwrap func() error + type ErrorWithSourcePos struct + Pos *SourcePos + Underlying error + func (e ErrorWithSourcePos) Error() string + func (e ErrorWithSourcePos) GetPosition() SourcePos + func (e ErrorWithSourcePos) Unwrap() error + type FileAccessor func(filename string) (io.ReadCloser, error) + func FileContentsFromMap(files map[string]string) FileAccessor + type Parser struct + Accessor FileAccessor + ErrorReporter ErrorReporter + ImportPaths []string + IncludeSourceCodeInfo bool + InferImportPaths bool + InterpretOptionsInUnlinkedFiles bool + LookupImport func(string) (*desc.FileDescriptor, error) + LookupImportProto func(string) (*dpb.FileDescriptorProto, error) + ValidateUnlinkedFiles bool + WarningReporter WarningReporter + func (p Parser) ParseFiles(filenames ...string) ([]*desc.FileDescriptor, error) + func (p Parser) ParseFilesButDoNotLink(filenames ...string) ([]*dpb.FileDescriptorProto, error) + func (p Parser) ParseToAST(filenames ...string) ([]*ast.FileNode, error) + type SourcePos = ast.SourcePos + type WarningReporter func(ErrorWithPos)