fluent interface for node SetAttribure
This commit is contained in:
@@ -32,8 +32,9 @@ func (n Assign) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Assign) SetAttribute(key string, value interface{}) {
|
||||
func (n Assign) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Assign) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n AssignRef) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n AssignRef) SetAttribute(key string, value interface{}) {
|
||||
func (n AssignRef) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n AssignRef) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n BitwiseAnd) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n BitwiseAnd) SetAttribute(key string, value interface{}) {
|
||||
func (n BitwiseAnd) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n BitwiseAnd) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n BitwiseOr) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n BitwiseOr) SetAttribute(key string, value interface{}) {
|
||||
func (n BitwiseOr) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n BitwiseOr) Position() *node.Position {
|
||||
|
||||
@@ -28,8 +28,9 @@ func (n BitwiseXor) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n BitwiseXor) SetAttribute(key string, value interface{}) {
|
||||
func (n BitwiseXor) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n BitwiseXor) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Concat) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Concat) SetAttribute(key string, value interface{}) {
|
||||
func (n Concat) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Concat) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Div) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Div) SetAttribute(key string, value interface{}) {
|
||||
func (n Div) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Div) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Minus) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Minus) SetAttribute(key string, value interface{}) {
|
||||
func (n Minus) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Minus) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Mod) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Mod) SetAttribute(key string, value interface{}) {
|
||||
func (n Mod) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Mod) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Mul) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Mul) SetAttribute(key string, value interface{}) {
|
||||
func (n Mul) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Mul) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Plus) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Plus) SetAttribute(key string, value interface{}) {
|
||||
func (n Plus) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Plus) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Pow) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Pow) SetAttribute(key string, value interface{}) {
|
||||
func (n Pow) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Pow) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n ShiftLeft) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n ShiftLeft) SetAttribute(key string, value interface{}) {
|
||||
func (n ShiftLeft) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n ShiftLeft) Position() *node.Position {
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n ShiftRight) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n ShiftRight) SetAttribute(key string, value interface{}) {
|
||||
func (n ShiftRight) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n ShiftRight) Position() *node.Position {
|
||||
|
||||
Reference in New Issue
Block a user