add attributes fiald to all nodes

This commit is contained in:
vadim
2017-12-29 17:53:13 +02:00
parent 70a4ef18ab
commit cdb405fcc7
151 changed files with 586 additions and 359 deletions

View File

@@ -5,6 +5,7 @@ import (
)
type Cast struct {
name string
expr node.Node
name string
attributes map[string]interface{}
expr node.Node
}

View File

@@ -12,6 +12,7 @@ func NewCastArray(expr node.Node) node.Node {
return CastArray{
Cast{
"CastArray",
map[string]interface{}{},
expr,
},
}
@@ -22,7 +23,7 @@ func (n CastArray) Name() string {
}
func (n CastArray) Attributes() map[string]interface{} {
return nil
return n.attributes
}
func (n CastArray) Walk(v node.Visitor) {

View File

@@ -12,6 +12,7 @@ func NewCastBool(expr node.Node) node.Node {
return CastBool{
Cast{
"CastBool",
map[string]interface{}{},
expr,
},
}
@@ -22,7 +23,7 @@ func (n CastBool) Name() string {
}
func (n CastBool) Attributes() map[string]interface{} {
return nil
return n.attributes
}
func (n CastBool) Walk(v node.Visitor) {

View File

@@ -12,6 +12,7 @@ func NewCastDouble(expr node.Node) node.Node {
return CastDouble{
Cast{
"CastDouble",
map[string]interface{}{},
expr,
},
}
@@ -22,7 +23,7 @@ func (n CastDouble) Name() string {
}
func (n CastDouble) Attributes() map[string]interface{} {
return nil
return n.attributes
}
func (n CastDouble) Walk(v node.Visitor) {

View File

@@ -12,6 +12,7 @@ func NewCastInt(expr node.Node) node.Node {
return CastInt{
Cast{
"CastInt",
map[string]interface{}{},
expr,
},
}
@@ -22,7 +23,7 @@ func (n CastInt) Name() string {
}
func (n CastInt) Attributes() map[string]interface{} {
return nil
return n.attributes
}
func (n CastInt) Walk(v node.Visitor) {

View File

@@ -12,6 +12,7 @@ func NewCastObject(expr node.Node) node.Node {
return CastObject{
Cast{
"CastObject",
map[string]interface{}{},
expr,
},
}
@@ -22,7 +23,7 @@ func (n CastObject) Name() string {
}
func (n CastObject) Attributes() map[string]interface{} {
return nil
return n.attributes
}
func (n CastObject) Walk(v node.Visitor) {

View File

@@ -12,6 +12,7 @@ func NewCastString(expr node.Node) node.Node {
return CastString{
Cast{
"CastString",
map[string]interface{}{},
expr,
},
}
@@ -22,7 +23,7 @@ func (n CastString) Name() string {
}
func (n CastString) Attributes() map[string]interface{} {
return nil
return n.attributes
}
func (n CastString) Walk(v node.Visitor) {

View File

@@ -12,6 +12,7 @@ func NewCastUnset(expr node.Node) node.Node {
return CastUnset{
Cast{
"CastUnset",
map[string]interface{}{},
expr,
},
}
@@ -22,7 +23,7 @@ func (n CastUnset) Name() string {
}
func (n CastUnset) Attributes() map[string]interface{} {
return nil
return n.attributes
}
func (n CastUnset) Walk(v node.Visitor) {