node position
This commit is contained in:
@@ -7,5 +7,6 @@ import (
|
||||
type Cast struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
expr node.Node
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ func NewCastArray(expr node.Node) node.Node {
|
||||
Cast{
|
||||
"CastArray",
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
expr,
|
||||
},
|
||||
}
|
||||
@@ -34,6 +35,15 @@ func (n CastArray) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastArray) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n CastArray) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastArray) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -13,6 +13,7 @@ func NewCastBool(expr node.Node) node.Node {
|
||||
Cast{
|
||||
"CastBool",
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
expr,
|
||||
},
|
||||
}
|
||||
@@ -34,6 +35,15 @@ func (n CastBool) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastBool) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n CastBool) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastBool) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -13,6 +13,7 @@ func NewCastDouble(expr node.Node) node.Node {
|
||||
Cast{
|
||||
"CastDouble",
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
expr,
|
||||
},
|
||||
}
|
||||
@@ -34,6 +35,15 @@ func (n CastDouble) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastDouble) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n CastDouble) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastDouble) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -13,6 +13,7 @@ func NewCastInt(expr node.Node) node.Node {
|
||||
Cast{
|
||||
"CastInt",
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
expr,
|
||||
},
|
||||
}
|
||||
@@ -34,6 +35,15 @@ func (n CastInt) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastInt) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n CastInt) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastInt) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -13,6 +13,7 @@ func NewCastObject(expr node.Node) node.Node {
|
||||
Cast{
|
||||
"CastObject",
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
expr,
|
||||
},
|
||||
}
|
||||
@@ -34,6 +35,15 @@ func (n CastObject) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastObject) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n CastObject) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastObject) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -13,6 +13,7 @@ func NewCastString(expr node.Node) node.Node {
|
||||
Cast{
|
||||
"CastString",
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
expr,
|
||||
},
|
||||
}
|
||||
@@ -34,6 +35,15 @@ func (n CastString) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastString) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n CastString) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastString) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -13,6 +13,7 @@ func NewCastUnset(expr node.Node) node.Node {
|
||||
Cast{
|
||||
"CastUnset",
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
expr,
|
||||
},
|
||||
}
|
||||
@@ -34,6 +35,15 @@ func (n CastUnset) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastUnset) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n CastUnset) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastUnset) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user