fluent interface for node SetAttribure

This commit is contained in:
vadim
2018-01-02 14:11:08 +02:00
parent 2051e3a23d
commit 31cc11da0c
153 changed files with 392 additions and 240 deletions

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {