fix poiner receiver at nodes

This commit is contained in:
z7zmey
2018-01-08 21:32:57 +02:00
parent 855665b565
commit 4ecb9edbd8
154 changed files with 1421 additions and 1416 deletions

View File

@@ -19,29 +19,29 @@ func NewName(Parts []node.Node) *Name {
}
}
func (n Name) Attributes() map[string]interface{} {
func (n *Name) Attributes() map[string]interface{} {
return nil
}
func (n Name) Position() *node.Position {
func (n *Name) Position() *node.Position {
return n.position
}
func (n Name) SetPosition(p *node.Position) node.Node {
func (n *Name) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n Name) Comments() *[]comment.Comment {
func (n *Name) Comments() *[]comment.Comment {
return n.comments
}
func (n Name) SetComments(c *[]comment.Comment) node.Node {
func (n *Name) SetComments(c *[]comment.Comment) node.Node {
n.comments = c
return n
}
func (n Name) Walk(v node.Visitor) {
func (n *Name) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return
}

View File

@@ -19,31 +19,31 @@ func NewNamePart(Value string) *NamePart {
}
}
func (n NamePart) Attributes() map[string]interface{} {
func (n *NamePart) Attributes() map[string]interface{} {
return map[string]interface{}{
"Value": n.Value,
}
}
func (n NamePart) Position() *node.Position {
func (n *NamePart) Position() *node.Position {
return n.position
}
func (n NamePart) SetPosition(p *node.Position) node.Node {
func (n *NamePart) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n NamePart) Comments() *[]comment.Comment {
func (n *NamePart) Comments() *[]comment.Comment {
return n.comments
}
func (n NamePart) SetComments(c *[]comment.Comment) node.Node {
func (n *NamePart) SetComments(c *[]comment.Comment) node.Node {
n.comments = c
return n
}
func (n NamePart) Walk(v node.Visitor) {
func (n *NamePart) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return
}