type go/token.Pos
341 uses
go/token (current package)
position.go#L79: type Pos int
position.go#L86: const NoPos Pos = 0
position.go#L89: func (p Pos) IsValid() bool {
position.go#L218: func (f *File) LineStart(line int) Pos {
position.go#L227: return Pos(f.base + f.lines[line-1])
position.go#L268: func (f *File) Pos(offset int) Pos {
position.go#L272: return Pos(f.base + offset)
position.go#L279: func (f *File) Offset(p Pos) int {
position.go#L289: func (f *File) Line(p Pos) int {
position.go#L334: func (f *File) position(p Pos, adjusted bool) (pos Position) {
position.go#L346: func (f *File) PositionFor(p Pos, adjusted bool) (pos Position) {
position.go#L359: func (f *File) Position(p Pos) (pos Position) {
position.go#L473: func (s *FileSet) file(p Pos) *File {
position.go#L500: func (s *FileSet) File(p Pos) (f *File) {
position.go#L512: func (s *FileSet) PositionFor(p Pos, adjusted bool) (pos Position) {
position.go#L524: func (s *FileSet) Position(p Pos) (pos Position) {
go/ast
ast.go#L34: Pos() token.Pos // position of first character belonging to the node
ast.go#L35: End() token.Pos // position of first character immediately after the node
ast.go#L66: Slash token.Pos // position of "/" starting the comment
ast.go#L70: func (c *Comment) Pos() token.Pos { return c.Slash }
ast.go#L71: func (c *Comment) End() token.Pos { return token.Pos(int(c.Slash) + len(c.Text)) }
ast.go#L80: func (g *CommentGroup) Pos() token.Pos { return g.List[0].Pos() }
ast.go#L81: func (g *CommentGroup) End() token.Pos { return g.List[len(g.List)-1].End() }
ast.go#L204: func (f *Field) Pos() token.Pos {
ast.go#L214: func (f *Field) End() token.Pos {
ast.go#L230: Opening token.Pos // position of opening parenthesis/brace/bracket, if any
ast.go#L232: Closing token.Pos // position of closing parenthesis/brace/bracket, if any
ast.go#L235: func (f *FieldList) Pos() token.Pos {
ast.go#L247: func (f *FieldList) End() token.Pos {
ast.go#L283: From, To token.Pos // position range of bad expression
ast.go#L288: NamePos token.Pos // identifier position
ast.go#L297: Ellipsis token.Pos // position of "..."
ast.go#L303: ValuePos token.Pos // literal position
ast.go#L317: Lbrace token.Pos // position of "{"
ast.go#L319: Rbrace token.Pos // position of "}"
ast.go#L325: Lparen token.Pos // position of "("
ast.go#L327: Rparen token.Pos // position of ")"
ast.go#L339: Lbrack token.Pos // position of "["
ast.go#L341: Rbrack token.Pos // position of "]"
ast.go#L348: Lbrack token.Pos // position of "["
ast.go#L350: Rbrack token.Pos // position of "]"
ast.go#L356: Lbrack token.Pos // position of "["
ast.go#L361: Rbrack token.Pos // position of "]"
ast.go#L369: Lparen token.Pos // position of "("
ast.go#L371: Rparen token.Pos // position of ")"
ast.go#L377: Lparen token.Pos // position of "("
ast.go#L379: Ellipsis token.Pos // position of "..." (token.NoPos if there is no "...")
ast.go#L380: Rparen token.Pos // position of ")"
ast.go#L387: Star token.Pos // position of "*"
ast.go#L395: OpPos token.Pos // position of Op
ast.go#L403: OpPos token.Pos // position of Op
ast.go#L413: Colon token.Pos // position of ":"
ast.go#L435: Lbrack token.Pos // position of "["
ast.go#L442: Struct token.Pos // position of "struct" keyword
ast.go#L451: Func token.Pos // position of "func" keyword (token.NoPos if there is no "func")
ast.go#L459: Interface token.Pos // position of "interface" keyword
ast.go#L466: Map token.Pos // position of "map" keyword
ast.go#L473: Begin token.Pos // position of "chan" keyword or "<-" (whichever comes first)
ast.go#L474: Arrow token.Pos // position of "<-" (token.NoPos if there is no "<-")
ast.go#L482: func (x *BadExpr) Pos() token.Pos { return x.From }
ast.go#L483: func (x *Ident) Pos() token.Pos { return x.NamePos }
ast.go#L484: func (x *Ellipsis) Pos() token.Pos { return x.Ellipsis }
ast.go#L485: func (x *BasicLit) Pos() token.Pos { return x.ValuePos }
ast.go#L486: func (x *FuncLit) Pos() token.Pos { return x.Type.Pos() }
ast.go#L487: func (x *CompositeLit) Pos() token.Pos {
ast.go#L493: func (x *ParenExpr) Pos() token.Pos { return x.Lparen }
ast.go#L494: func (x *SelectorExpr) Pos() token.Pos { return x.X.Pos() }
ast.go#L495: func (x *IndexExpr) Pos() token.Pos { return x.X.Pos() }
ast.go#L496: func (x *IndexListExpr) Pos() token.Pos { return x.X.Pos() }
ast.go#L497: func (x *SliceExpr) Pos() token.Pos { return x.X.Pos() }
ast.go#L498: func (x *TypeAssertExpr) Pos() token.Pos { return x.X.Pos() }
ast.go#L499: func (x *CallExpr) Pos() token.Pos { return x.Fun.Pos() }
ast.go#L500: func (x *StarExpr) Pos() token.Pos { return x.Star }
ast.go#L501: func (x *UnaryExpr) Pos() token.Pos { return x.OpPos }
ast.go#L502: func (x *BinaryExpr) Pos() token.Pos { return x.X.Pos() }
ast.go#L503: func (x *KeyValueExpr) Pos() token.Pos { return x.Key.Pos() }
ast.go#L504: func (x *ArrayType) Pos() token.Pos { return x.Lbrack }
ast.go#L505: func (x *StructType) Pos() token.Pos { return x.Struct }
ast.go#L506: func (x *FuncType) Pos() token.Pos {
ast.go#L512: func (x *InterfaceType) Pos() token.Pos { return x.Interface }
ast.go#L513: func (x *MapType) Pos() token.Pos { return x.Map }
ast.go#L514: func (x *ChanType) Pos() token.Pos { return x.Begin }
ast.go#L516: func (x *BadExpr) End() token.Pos { return x.To }
ast.go#L517: func (x *Ident) End() token.Pos { return token.Pos(int(x.NamePos) + len(x.Name)) }
ast.go#L518: func (x *Ellipsis) End() token.Pos {
ast.go#L524: func (x *BasicLit) End() token.Pos { return token.Pos(int(x.ValuePos) + len(x.Value)) }
ast.go#L525: func (x *FuncLit) End() token.Pos { return x.Body.End() }
ast.go#L526: func (x *CompositeLit) End() token.Pos { return x.Rbrace + 1 }
ast.go#L527: func (x *ParenExpr) End() token.Pos { return x.Rparen + 1 }
ast.go#L528: func (x *SelectorExpr) End() token.Pos { return x.Sel.End() }
ast.go#L529: func (x *IndexExpr) End() token.Pos { return x.Rbrack + 1 }
ast.go#L530: func (x *IndexListExpr) End() token.Pos { return x.Rbrack + 1 }
ast.go#L531: func (x *SliceExpr) End() token.Pos { return x.Rbrack + 1 }
ast.go#L532: func (x *TypeAssertExpr) End() token.Pos { return x.Rparen + 1 }
ast.go#L533: func (x *CallExpr) End() token.Pos { return x.Rparen + 1 }
ast.go#L534: func (x *StarExpr) End() token.Pos { return x.X.End() }
ast.go#L535: func (x *UnaryExpr) End() token.Pos { return x.X.End() }
ast.go#L536: func (x *BinaryExpr) End() token.Pos { return x.Y.End() }
ast.go#L537: func (x *KeyValueExpr) End() token.Pos { return x.Value.End() }
ast.go#L538: func (x *ArrayType) End() token.Pos { return x.Elt.End() }
ast.go#L539: func (x *StructType) End() token.Pos { return x.Fields.End() }
ast.go#L540: func (x *FuncType) End() token.Pos {
ast.go#L546: func (x *InterfaceType) End() token.Pos { return x.Methods.End() }
ast.go#L547: func (x *MapType) End() token.Pos { return x.Value.End() }
ast.go#L548: func (x *ChanType) End() token.Pos { return x.Value.End() }
ast.go#L613: From, To token.Pos // position range of bad statement
ast.go#L626: Semicolon token.Pos // position of following ";"
ast.go#L633: Colon token.Pos // position of ":"
ast.go#L647: Arrow token.Pos // position of "<-"
ast.go#L654: TokPos token.Pos // position of Tok
ast.go#L663: TokPos token.Pos // position of Tok
ast.go#L670: Go token.Pos // position of "go" keyword
ast.go#L676: Defer token.Pos // position of "defer" keyword
ast.go#L682: Return token.Pos // position of "return" keyword
ast.go#L690: TokPos token.Pos // position of Tok
ast.go#L697: Lbrace token.Pos // position of "{"
ast.go#L699: Rbrace token.Pos // position of "}", if any (may be absent due to syntax error)
ast.go#L704: If token.Pos // position of "if" keyword
ast.go#L713: Case token.Pos // position of "case" or "default" keyword
ast.go#L715: Colon token.Pos // position of ":"
ast.go#L721: Switch token.Pos // position of "switch" keyword
ast.go#L729: Switch token.Pos // position of "switch" keyword
ast.go#L737: Case token.Pos // position of "case" or "default" keyword
ast.go#L739: Colon token.Pos // position of ":"
ast.go#L745: Select token.Pos // position of "select" keyword
ast.go#L751: For token.Pos // position of "for" keyword
ast.go#L760: For token.Pos // position of "for" keyword
ast.go#L762: TokPos token.Pos // position of Tok; invalid if Key == nil
ast.go#L771: func (s *BadStmt) Pos() token.Pos { return s.From }
ast.go#L772: func (s *DeclStmt) Pos() token.Pos { return s.Decl.Pos() }
ast.go#L773: func (s *EmptyStmt) Pos() token.Pos { return s.Semicolon }
ast.go#L774: func (s *LabeledStmt) Pos() token.Pos { return s.Label.Pos() }
ast.go#L775: func (s *ExprStmt) Pos() token.Pos { return s.X.Pos() }
ast.go#L776: func (s *SendStmt) Pos() token.Pos { return s.Chan.Pos() }
ast.go#L777: func (s *IncDecStmt) Pos() token.Pos { return s.X.Pos() }
ast.go#L778: func (s *AssignStmt) Pos() token.Pos { return s.Lhs[0].Pos() }
ast.go#L779: func (s *GoStmt) Pos() token.Pos { return s.Go }
ast.go#L780: func (s *DeferStmt) Pos() token.Pos { return s.Defer }
ast.go#L781: func (s *ReturnStmt) Pos() token.Pos { return s.Return }
ast.go#L782: func (s *BranchStmt) Pos() token.Pos { return s.TokPos }
ast.go#L783: func (s *BlockStmt) Pos() token.Pos { return s.Lbrace }
ast.go#L784: func (s *IfStmt) Pos() token.Pos { return s.If }
ast.go#L785: func (s *CaseClause) Pos() token.Pos { return s.Case }
ast.go#L786: func (s *SwitchStmt) Pos() token.Pos { return s.Switch }
ast.go#L787: func (s *TypeSwitchStmt) Pos() token.Pos { return s.Switch }
ast.go#L788: func (s *CommClause) Pos() token.Pos { return s.Case }
ast.go#L789: func (s *SelectStmt) Pos() token.Pos { return s.Select }
ast.go#L790: func (s *ForStmt) Pos() token.Pos { return s.For }
ast.go#L791: func (s *RangeStmt) Pos() token.Pos { return s.For }
ast.go#L793: func (s *BadStmt) End() token.Pos { return s.To }
ast.go#L794: func (s *DeclStmt) End() token.Pos { return s.Decl.End() }
ast.go#L795: func (s *EmptyStmt) End() token.Pos {
ast.go#L801: func (s *LabeledStmt) End() token.Pos { return s.Stmt.End() }
ast.go#L802: func (s *ExprStmt) End() token.Pos { return s.X.End() }
ast.go#L803: func (s *SendStmt) End() token.Pos { return s.Value.End() }
ast.go#L804: func (s *IncDecStmt) End() token.Pos {
ast.go#L807: func (s *AssignStmt) End() token.Pos { return s.Rhs[len(s.Rhs)-1].End() }
ast.go#L808: func (s *GoStmt) End() token.Pos { return s.Call.End() }
ast.go#L809: func (s *DeferStmt) End() token.Pos { return s.Call.End() }
ast.go#L810: func (s *ReturnStmt) End() token.Pos {
ast.go#L816: func (s *BranchStmt) End() token.Pos {
ast.go#L820: return token.Pos(int(s.TokPos) + len(s.Tok.String()))
ast.go#L822: func (s *BlockStmt) End() token.Pos {
ast.go#L831: func (s *IfStmt) End() token.Pos {
ast.go#L837: func (s *CaseClause) End() token.Pos {
ast.go#L843: func (s *SwitchStmt) End() token.Pos { return s.Body.End() }
ast.go#L844: func (s *TypeSwitchStmt) End() token.Pos { return s.Body.End() }
ast.go#L845: func (s *CommClause) End() token.Pos {
ast.go#L851: func (s *SelectStmt) End() token.Pos { return s.Body.End() }
ast.go#L852: func (s *ForStmt) End() token.Pos { return s.Body.End() }
ast.go#L853: func (s *RangeStmt) End() token.Pos { return s.Body.End() }
ast.go#L899: EndPos token.Pos // end of spec (overrides Path.Pos if nonzero)
ast.go#L918: Assign token.Pos // position of '=', if any
ast.go#L926: func (s *ImportSpec) Pos() token.Pos {
ast.go#L932: func (s *ValueSpec) Pos() token.Pos { return s.Names[0].Pos() }
ast.go#L933: func (s *TypeSpec) Pos() token.Pos { return s.Name.Pos() }
ast.go#L935: func (s *ImportSpec) End() token.Pos {
ast.go#L942: func (s *ValueSpec) End() token.Pos {
ast.go#L951: func (s *TypeSpec) End() token.Pos { return s.Type.End() }
ast.go#L968: From, To token.Pos // position range of bad declaration
ast.go#L984: TokPos token.Pos // position of Tok
ast.go#L986: Lparen token.Pos // position of '(', if any
ast.go#L988: Rparen token.Pos // position of ')', if any
ast.go#L1003: func (d *BadDecl) Pos() token.Pos { return d.From }
ast.go#L1004: func (d *GenDecl) Pos() token.Pos { return d.TokPos }
ast.go#L1005: func (d *FuncDecl) Pos() token.Pos { return d.Type.Pos() }
ast.go#L1007: func (d *BadDecl) End() token.Pos { return d.To }
ast.go#L1008: func (d *GenDecl) End() token.Pos {
ast.go#L1014: func (d *FuncDecl) End() token.Pos {
ast.go#L1052: Package token.Pos // position of "package" keyword
ast.go#L1061: func (f *File) Pos() token.Pos { return f.Package }
ast.go#L1062: func (f *File) End() token.Pos {
ast.go#L1079: func (p *Package) Pos() token.Pos { return token.NoPos }
ast.go#L1080: func (p *Package) End() token.Pos { return token.NoPos }
commentmap.go#L117: func (s *nodeStack) pop(pos token.Pos) (top Node) {
filter.go#L369: var pos token.Pos
import.go#L55: func lineAt(fset *token.FileSet, pos token.Pos) int {
import.go#L92: Start token.Pos
import.go#L93: End token.Pos
import.go#L121: var end token.Pos
print.go#L244: case token.Pos:
resolve.go#L21: func (p *pkgBuilder) error(pos token.Pos, msg string) {
resolve.go#L25: func (p *pkgBuilder) errorf(pos token.Pos, format string, args ...any) {
scope.go#L92: func (obj *Object) Pos() token.Pos {
go/build
build.go#L1375: pos token.Pos
go/doc
doc.go#L90: Pos, End token.Pos // position range of the comment containing the marker
exports.go#L259: func copyConstType(typ ast.Expr, pos token.Pos) ast.Expr {
go/internal/typeparams
typeparams.go#L12: func PackIndexExpr(x ast.Expr, lbrack token.Pos, exprs []ast.Expr, rbrack token.Pos) ast.Expr {
go/parser
parser.go#L47: pos token.Pos // token position
parser.go#L55: syncPos token.Pos // last synchronization position
parser.go#L227: func (p *parser) error(pos token.Pos, msg string) {
parser.go#L250: func (p *parser) errorExpected(pos token.Pos, msg string) {
parser.go#L268: func (p *parser) expect(tok token.Token) token.Pos {
parser.go#L279: func (p *parser) expect2(tok token.Token) (pos token.Pos) {
parser.go#L292: func (p *parser) expectClosing(tok token.Token, context string) token.Pos {
parser.go#L410: func (p *parser) safePos(pos token.Pos) (res token.Pos) {
parser.go#L413: res = token.Pos(p.file.Base() + p.file.Size()) // EOF position
parser.go#L530: func (p *parser) parseArrayType(lbrack token.Pos, len ast.Expr) *ast.ArrayType {
parser.go#L567: var firstComma token.Pos
parser.go#L1203: var arrow token.Pos
parser.go#L1447: var colons [N - 1]token.Pos
parser.go#L1448: var firstComma token.Pos
parser.go#L1522: var ellipsis token.Pos
parser.go#L2087: pos token.Pos
parser.go#L2490: type parseSpecFunction func(doc *ast.CommentGroup, pos token.Pos, keyword token.Token, iota int) ast.Spec
parser.go#L2503: func (p *parser) parseImportSpec(doc *ast.CommentGroup, _ token.Pos, _ token.Token, _ int) ast.Spec {
parser.go#L2542: func (p *parser) parseValueSpec(doc *ast.CommentGroup, _ token.Pos, keyword token.Token, iota int) ast.Spec {
parser.go#L2579: func (p *parser) parseGenericType(spec *ast.TypeSpec, openPos token.Pos, name0 *ast.Ident, typ0 ast.Expr) {
parser.go#L2597: func (p *parser) parseTypeSpec(doc *ast.CommentGroup, _ token.Pos, _ token.Token, _ int) ast.Spec {
parser.go#L2732: var lparen, rparen token.Pos
parser.go#L2892: var declErr func(token.Pos, string)
resolver.go#L21: func resolveFile(file *ast.File, handle *token.File, declErr func(token.Pos, string)) {
resolver.go#L49: pos := ident.Obj.Decl.(interface{ Pos() token.Pos }).Pos()
resolver.go#L59: declErr func(token.Pos, string)
resolver.go#L80: case token.Pos:
resolver.go#L87: func (r *resolver) openScope(pos token.Pos) {
go/printer
nodes.go#L130: func (p *printer) exprList(prev0 token.Pos, list []ast.Expr, depth int, mode exprListMode, next0 token.Pos, isIncomplete bool) {
nodes.go#L1825: func (p *printer) distanceFrom(startPos token.Pos, startOutCol int) int {
printer.go#L93: cachedPos token.Pos
printer.go#L196: func (p *printer) posFor(pos token.Pos) token.Position {
printer.go#L201: func (p *printer) lineFor(pos token.Pos) int {
printer.go#L967: case token.Pos:
go/scanner
scanner.go#L829: func (s *Scanner) Scan() (pos token.Pos, tok token.Token, lit string) {
go/types
api.go#L45: Pos token.Pos // error position
api.go#L55: go116start token.Pos
api.go#L56: go116end token.Pos
call.go#L63: func (check *Checker) instantiateSignature(pos token.Pos, typ *Signature, targs []Type, xlist []ast.Expr) (res *Signature) {
check.go#L40: pos token.Pos // if valid, identifiers are looked up as if at position pos (used by Eval)
decl.go#L23: func (check *Checker) declare(scope *Scope, id *ast.Ident, obj Object, pos token.Pos) {
errors.go#L86: case token.Pos:
errors.go#L130: func (check *Checker) trace(pos token.Pos, format string, args ...any) {
errors.go#L241: Pos() token.Pos
errors.go#L250: start, pos, end token.Pos
errors.go#L253: func (e posSpan) Pos() token.Pos {
errors.go#L260: func inNode(node ast.Node, pos token.Pos) posSpan {
errors.go#L269: type atPos token.Pos
errors.go#L271: func (s atPos) Pos() token.Pos {
errors.go#L272: return token.Pos(s)
eval.go#L24: func Eval(fset *token.FileSet, pkg *Package, pos token.Pos, expr string) (_ TypeAndValue, err error) {
eval.go#L57: func CheckExpr(fset *token.FileSet, pkg *Package, pos token.Pos, expr ast.Expr, info *Info) (err error) {
expr.go#L90: func (check *Checker) overflow(x *operand, op token.Token, opPos token.Pos) {
expr.go#L1062: func (check *Checker) binary(x *operand, e ast.Expr, lhs, rhs ast.Expr, op token.Token, opPos token.Pos) {
instantiate.go#L66: func (check *Checker) instance(pos token.Pos, orig Type, targs []Type, ctxt *Context) (res Type) {
instantiate.go#L124: func (check *Checker) validateTArgLen(pos token.Pos, ntparams, ntargs int) bool {
instantiate.go#L136: func (check *Checker) verify(pos token.Pos, tparams []*TypeParam, targs []Type) (int, error) {
interface.go#L21: embedPos *[]token.Pos // positions of embedded elements; or nil (for error messages) - use pointer to save space
interface.go#L159: addEmbedded := func(pos token.Pos, typ Type) {
interface.go#L162: ityp.embedPos = new([]token.Pos)
labels.go#L98: varDeclPos token.Pos
labels.go#L105: recordVarDecl := func(pos token.Pos) {
mono.go#L78: pos token.Pos
mono.go#L170: func (w *monoGraph) recordInstance(pkg *Package, pos token.Pos, tparams []*TypeParam, targs []Type, xlist []ast.Expr) {
mono.go#L181: func (w *monoGraph) assign(pkg *Package, pos token.Pos, tpar *TypeParam, targ Type) {
mono.go#L326: func (w *monoGraph) addEdge(dst, src, weight int, pos token.Pos, typ Type) {
named.go#L358: func expandNamed(ctxt *Context, n *Named, instPos token.Pos) (tparams *TypeParamList, underlying Type, methods *methodList) {
object.go#L20: Pos() token.Pos // position of object identifier in declaration
object.go#L55: scopePos() token.Pos
object.go#L58: setScopePos(pos token.Pos)
object.go#L84: pos token.Pos
object.go#L90: scopePos_ token.Pos
object.go#L129: func (obj *object) Pos() token.Pos { return obj.pos }
object.go#L152: func (obj *object) scopePos() token.Pos { return obj.scopePos_ }
object.go#L158: func (obj *object) setScopePos(pos token.Pos) { obj.scopePos_ = pos }
object.go#L192: func NewPkgName(pos token.Pos, pkg *Package, name string, imported *Package) *PkgName {
object.go#L208: func NewConst(pos token.Pos, pkg *Package, name string, typ Type, val constant.Value) *Const {
object.go#L229: func NewTypeName(pos token.Pos, pkg *Package, name string, typ Type) *TypeName {
object.go#L235: func _NewTypeNameLazy(pos token.Pos, pkg *Package, name string, load func(named *Named) (tparams []*TypeParam, underlying Type, methods []*Func)) *TypeName {
object.go#L289: func NewVar(pos token.Pos, pkg *Package, name string, typ Type) *Var {
object.go#L294: func NewParam(pos token.Pos, pkg *Package, name string, typ Type) *Var {
object.go#L301: func NewField(pos token.Pos, pkg *Package, name string, typ Type, embedded bool) *Var {
object.go#L327: func NewFunc(pos token.Pos, pkg *Package, name string, sig *Signature) *Func {
object.go#L378: func NewLabel(pos token.Pos, pkg *Package, name string) *Label {
operand.go#L64: func (x *operand) Pos() token.Pos {
resolver.go#L241: pos, end = token.Pos(f.Base()), token.Pos(f.Base()+f.Size())
scope.go#L28: pos, end token.Pos // scope extent; may be invalid
scope.go#L35: func NewScope(parent *Scope, pos, end token.Pos, comment string) *Scope {
scope.go#L85: func (s *Scope) LookupParent(name string, pos token.Pos) (*Scope, Object) {
scope.go#L172: func (s *Scope) Pos() token.Pos { return s.pos }
scope.go#L173: func (s *Scope) End() token.Pos { return s.end }
scope.go#L178: func (s *Scope) Contains(pos token.Pos) bool {
scope.go#L187: func (s *Scope) Innermost(pos token.Pos) *Scope {
scope.go#L278: func (*lazyObject) Pos() token.Pos { panic("unreachable") }
scope.go#L292: func (*lazyObject) scopePos() token.Pos { panic("unreachable") }
scope.go#L293: func (*lazyObject) setScopePos(pos token.Pos) { panic("unreachable") }
stmt.go#L232: pos token.Pos
stmt.go#L723: scopePos := clause.Pos() + token.Pos(len("default")) // for default clause (len(List) == 0)
struct.go#L84: add := func(ident *ast.Ident, embedded bool, pos token.Pos) {
struct.go#L105: addInvalid := func(ident *ast.Ident, pos token.Pos) {
struct.go#L198: func (check *Checker) declareInSet(oset *objset, pos token.Pos, obj Object) bool {
subst.go#L52: func (check *Checker) subst(pos token.Pos, typ Type, smap substMap, ctxt *Context) Type {
subst.go#L76: pos token.Pos
typeset.go#L153: func computeInterfaceTypeSet(check *Checker, pos token.Pos, ityp *Interface) *_TypeSet {
typeset.go#L221: mpos := make(map[*Func]token.Pos) // method specification or method embedding position, for good error messages
typeset.go#L222: addMethod := func(pos token.Pos, m *Func, explicit bool) {
typeset.go#L266: var pos token.Pos // embedding position
typeset.go#L393: func computeUnionTypeSet(check *Checker, unionSets map[*Union]*_TypeSet, pos token.Pos, utyp *Union) *_TypeSet {
golang.org/x/tools/internal/gcimporter
bimport.go#L307: func (p *importer) pos() token.Pos {
bimport.go#L352: func (s *fakeFileSet) pos(file string, line, column int) token.Pos {
bimport.go#L372: return token.Pos(f.file.Base() + line - 1)
iexport.go#L372: func (p *iexporter) fileIndexAndOffset(file *token.File, pos token.Pos) (uint64, uint64) {
iexport.go#L567: func (w *exportWriter) pos(pos token.Pos) {
iexport.go#L581: func (w *exportWriter) posV2(pos token.Pos) {
iexport.go#L592: func (w *exportWriter) posV1(pos token.Pos) {
iexport.go#L626: func (w *exportWriter) posV0(pos token.Pos) {
iimport.go#L713: func (r *importReader) pos() token.Pos {
iimport.go#L753: func (r *importReader) posv2() token.Pos {
ureader_yes.go#L174: func (r *reader) pos() token.Pos {
golang.org/x/tools/internal/typeparams
common.go#L40: func UnpackIndexExpr(n ast.Node) (x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) {
common.go#L53: func PackIndexExpr(x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) ast.Expr {
golang.org/x/tools/internal/typesinternal
types.go#L38: func ReadGo116ErrorData(err types.Error) (code ErrorCode, start, end token.Pos, ok bool) {
types.go#L49: return ErrorCode(data[0]), token.Pos(data[1]), token.Pos(data[2]), true