extract positions package

This commit is contained in:
z7zmey
2018-01-09 15:51:32 +02:00
parent 23d938df99
commit 2078a6cde6
166 changed files with 2060 additions and 3030 deletions

View File

@@ -5,13 +5,11 @@ import (
)
type Dnumber struct {
position *node.Position
Value string
Value string
}
func NewDnumber(Value string) *Dnumber {
return &Dnumber{
nil,
Value,
}
}
@@ -22,15 +20,6 @@ func (n *Dnumber) Attributes() map[string]interface{} {
}
}
func (n *Dnumber) Position() *node.Position {
return n.position
}
func (n *Dnumber) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Dnumber) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -5,13 +5,11 @@ import (
)
type Encapsed struct {
position *node.Position
Parts []node.Node
Parts []node.Node
}
func NewEncapsed(Parts []node.Node) *Encapsed {
return &Encapsed{
nil,
Parts,
}
}
@@ -20,15 +18,6 @@ func (n *Encapsed) Attributes() map[string]interface{} {
return nil
}
func (n *Encapsed) Position() *node.Position {
return n.position
}
func (n *Encapsed) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Encapsed) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -5,13 +5,11 @@ import (
)
type EncapsedStringPart struct {
position *node.Position
Value string
Value string
}
func NewEncapsedStringPart(Value string) *EncapsedStringPart {
return &EncapsedStringPart{
nil,
Value,
}
}
@@ -22,15 +20,6 @@ func (n *EncapsedStringPart) Attributes() map[string]interface{} {
}
}
func (n *EncapsedStringPart) Position() *node.Position {
return n.position
}
func (n *EncapsedStringPart) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *EncapsedStringPart) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -5,13 +5,11 @@ import (
)
type Lnumber struct {
position *node.Position
Value string
Value string
}
func NewLnumber(Value string) *Lnumber {
return &Lnumber{
nil,
Value,
}
}
@@ -22,15 +20,6 @@ func (n *Lnumber) Attributes() map[string]interface{} {
}
}
func (n *Lnumber) Position() *node.Position {
return n.position
}
func (n *Lnumber) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Lnumber) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -5,13 +5,11 @@ import (
)
type MagicConstant struct {
position *node.Position
Value string
Value string
}
func NewMagicConstant(Value string) *MagicConstant {
return &MagicConstant{
nil,
Value,
}
}
@@ -22,15 +20,6 @@ func (n *MagicConstant) Attributes() map[string]interface{} {
}
}
func (n *MagicConstant) Position() *node.Position {
return n.position
}
func (n *MagicConstant) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *MagicConstant) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -5,13 +5,11 @@ import (
)
type String struct {
position *node.Position
Value string
Value string
}
func NewString(Value string) *String {
return &String{
nil,
Value,
}
}
@@ -22,15 +20,6 @@ func (n *String) Attributes() map[string]interface{} {
}
}
func (n *String) Position() *node.Position {
return n.position
}
func (n *String) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *String) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return