extract positions package
This commit is contained in:
@@ -11,7 +11,6 @@ type FullyQualified struct {
|
||||
func NewFullyQualified(Parts []node.Node) *FullyQualified {
|
||||
return &FullyQualified{
|
||||
Name{
|
||||
nil,
|
||||
Parts,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Name struct {
|
||||
position *node.Position
|
||||
Parts []node.Node
|
||||
Parts []node.Node
|
||||
}
|
||||
|
||||
func NewName(Parts []node.Node) *Name {
|
||||
return &Name{
|
||||
nil,
|
||||
Parts,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Name) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Name) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Name) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Name) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type NamePart struct {
|
||||
position *node.Position
|
||||
Value string
|
||||
Value string
|
||||
}
|
||||
|
||||
func NewNamePart(Value string) *NamePart {
|
||||
return &NamePart{
|
||||
nil,
|
||||
Value,
|
||||
}
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *NamePart) Attributes() map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *NamePart) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *NamePart) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *NamePart) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type Relative struct {
|
||||
func NewRelative(Parts []node.Node) *Relative {
|
||||
return &Relative{
|
||||
Name{
|
||||
nil,
|
||||
Parts,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user