Standard library / go/ast
go/ast.BadStmt.End()
Returns the stored To position of the malformed statement. Expected stdout: '7\n'.
Formal Syntax & Structure
go syntaxgo
func (s *BadStmt) End() token.PosReturn Value
token.Pos
Returns the stored To position of the malformed statement.
Working Example
Example Snippetgo
package main
import ( "fmt" "go/ast")
func main() { x := &ast.BadStmt{From: 3, To: 7}; fmt.Println(x.End()) }