extract positions package
This commit is contained in:
@@ -11,7 +11,6 @@ type Assign struct {
|
||||
func NewAssign(Variable node.Node, Expression node.Node) *Assign {
|
||||
return &Assign{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *Assign) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Assign) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Assign) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Assign) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type AssignOp struct {
|
||||
position *node.Position
|
||||
Variable node.Node
|
||||
Expression node.Node
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ type AssignRef struct {
|
||||
func NewAssignRef(Variable node.Node, Expression node.Node) *AssignRef {
|
||||
return &AssignRef{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *AssignRef) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *AssignRef) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *AssignRef) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *AssignRef) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type BitwiseAnd struct {
|
||||
func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
|
||||
return &BitwiseAnd{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *BitwiseAnd) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BitwiseAnd) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *BitwiseAnd) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseAnd) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type BitwiseOr struct {
|
||||
func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
|
||||
return &BitwiseOr{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *BitwiseOr) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BitwiseOr) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *BitwiseOr) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseOr) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type BitwiseXor struct {
|
||||
func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
|
||||
return &BitwiseXor{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *BitwiseXor) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BitwiseXor) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *BitwiseXor) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseXor) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type Concat struct {
|
||||
func NewConcat(Variable node.Node, Expression node.Node) *Concat {
|
||||
return &Concat{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *Concat) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Concat) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Concat) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Concat) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type Div struct {
|
||||
func NewDiv(Variable node.Node, Expression node.Node) *Div {
|
||||
return &Div{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *Div) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Div) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Div) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Div) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type Minus struct {
|
||||
func NewMinus(Variable node.Node, Expression node.Node) *Minus {
|
||||
return &Minus{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *Minus) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Minus) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Minus) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Minus) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type Mod struct {
|
||||
func NewMod(Variable node.Node, Expression node.Node) *Mod {
|
||||
return &Mod{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *Mod) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Mod) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Mod) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Mod) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type Mul struct {
|
||||
func NewMul(Variable node.Node, Expression node.Node) *Mul {
|
||||
return &Mul{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *Mul) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Mul) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Mul) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Mul) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type Plus struct {
|
||||
func NewPlus(Variable node.Node, Expression node.Node) *Plus {
|
||||
return &Plus{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *Plus) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Plus) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Plus) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Plus) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type Pow struct {
|
||||
func NewPow(Variable node.Node, Expression node.Node) *Pow {
|
||||
return &Pow{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *Pow) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Pow) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Pow) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Pow) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type ShiftLeft struct {
|
||||
func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
|
||||
return &ShiftLeft{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *ShiftLeft) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *ShiftLeft) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *ShiftLeft) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShiftLeft) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -11,7 +11,6 @@ type ShiftRight struct {
|
||||
func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
|
||||
return &ShiftRight{
|
||||
AssignOp{
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
@@ -22,15 +21,6 @@ func (n *ShiftRight) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *ShiftRight) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *ShiftRight) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShiftRight) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user