go/src/cmd/compile/internal/syntax/positions.go

// StartPos returns the start position of n.
func StartPos(n Node) Pos {}

// EndPos returns the approximate end position of n in the source.
// For some nodes (*Name, *BasicLit) it returns the position immediately
// following the node; for others (*BlockStmt, *SwitchStmt, etc.) it
// returns the position of the closing '}'; and for some (*ParenExpr)
// the returned position is the end position of the last enclosed
// expression.
// Thus, EndPos should not be used for exact demarcation of the
// end of a node in the source; it is mostly useful to determine
// scope ranges where there is some leeway.
func EndPos(n Node) Pos {}

func lastDecl(list []Decl) Decl {}

func lastExpr(list []Expr) Expr {}

func lastStmt(list []Stmt) Stmt {}

func lastField(list []*Field) *Field {}