Hi, all: in src/cmd/compile/internal/syntax/nodes.go, why need the aNode() function in the interface?
type Node interface { // Pos() returns the position associated with the node as follows: // 1) The position of a node representing a terminal syntax production // (Name, BasicLit, etc.) is the position of the respective production // in the source. // 2) The position of a node representing a non-terminal production // (IndexExpr, IfStmt, etc.) is the position of a token uniquely // associated with that production; usually the left-most one // ('[' for IndexExpr, 'if' for IfStmt, etc.) Pos() Pos aNode() } type node struct { // commented out for now since not yet used // doc *Comment // nil means no comment(s) attached pos Pos } func (n *node) Pos() Pos { return n.pos } func (*node) aNode() {} Thanks! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.