type File … func (pgf *File) String() string { … } // Fixed reports whether p was "Fixed", meaning that its source or positions // may not correlate with the original file. func (pgf *File) Fixed() bool { … } // PositionPos returns the token.Pos of protocol position p within the file. func (pgf *File) PositionPos(p protocol.Position) (token.Pos, error) { … } // PosRange returns a protocol Range for the token.Pos interval in this file. func (pgf *File) PosRange(start, end token.Pos) (protocol.Range, error) { … } // PosMappedRange returns a MappedRange for the token.Pos interval in this file. // A MappedRange can be converted to any other form. func (pgf *File) PosMappedRange(start, end token.Pos) (protocol.MappedRange, error) { … } // PosLocation returns a protocol Location for the token.Pos interval in this file. func (pgf *File) PosLocation(start, end token.Pos) (protocol.Location, error) { … } // NodeRange returns a protocol Range for the ast.Node interval in this file. func (pgf *File) NodeRange(node ast.Node) (protocol.Range, error) { … } // NodeMappedRange returns a MappedRange for the ast.Node interval in this file. // A MappedRange can be converted to any other form. func (pgf *File) NodeMappedRange(node ast.Node) (protocol.MappedRange, error) { … } // NodeLocation returns a protocol Location for the ast.Node interval in this file. func (pgf *File) NodeLocation(node ast.Node) (protocol.Location, error) { … } // RangePos parses a protocol Range back into the go/token domain. func (pgf *File) RangePos(r protocol.Range) (token.Pos, token.Pos, error) { … } // Resolve lazily resolves ast.Ident.Objects in the enclosed syntax tree. // // Resolve must be called before accessing any of: // - pgf.File.Scope // - pgf.File.Unresolved // - Ident.Obj, for any Ident in pgf.File func (pgf *File) Resolve() { … }