add attributes fiald to all nodes
This commit is contained in:
		
							parent
							
								
									70a4ef18ab
								
							
						
					
					
						commit
						cdb405fcc7
					
				| @ -13,7 +13,7 @@ type dumper struct { | ||||
| func (d dumper) EnterNode(n node.Node) bool { | ||||
| 
 | ||||
| 	fmt.Printf("%v%v", d.indent, n.Name()) | ||||
| 	if a := n.Attributes(); a != nil { | ||||
| 	if a := n.Attributes(); len(a) > 0 { | ||||
| 		fmt.Printf(" %v", a) | ||||
| 	} | ||||
| 	fmt.Println() | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type Array struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	items      []node.Node | ||||
| } | ||||
| 
 | ||||
| func NewArray(items []node.Node) node.Node { | ||||
| 	return Array{ | ||||
| 		"Array", | ||||
| 		map[string]interface{}{}, | ||||
| 		items, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n Array) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Array) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Array) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type ArrayDimFetch struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	variable   node.Node | ||||
| 	dim        node.Node | ||||
| } | ||||
| @ -13,6 +14,7 @@ type ArrayDimFetch struct { | ||||
| func NewArrayDimFetch(variable node.Node, dim node.Node) node.Node { | ||||
| 	return ArrayDimFetch{ | ||||
| 		"ArrayDimFetch", | ||||
| 		map[string]interface{}{}, | ||||
| 		variable, | ||||
| 		dim, | ||||
| 	} | ||||
| @ -23,7 +25,7 @@ func (n ArrayDimFetch) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ArrayDimFetch) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ArrayDimFetch) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -27,7 +27,7 @@ func (n ArrayItem) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ArrayItem) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ArrayItem) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewAssign(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Assign{ | ||||
| 		AssignOp{ | ||||
| 			"Assign", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Assign) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Assign) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Assign) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type AssignOp struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	variable   node.Node | ||||
| 	expression node.Node | ||||
| } | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewAssignRef(variable node.Node, expression node.Node) node.Node { | ||||
| 	return AssignRef{ | ||||
| 		AssignOp{ | ||||
| 			"AssignRef", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n AssignRef) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n AssignRef) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n AssignRef) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewBitwiseAnd(variable node.Node, expression node.Node) node.Node { | ||||
| 	return BitwiseAnd{ | ||||
| 		AssignOp{ | ||||
| 			"AssignBitwiseAnd", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n BitwiseAnd) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseAnd) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseAnd) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewBitwiseOr(variable node.Node, expression node.Node) node.Node { | ||||
| 	return BitwiseOr{ | ||||
| 		AssignOp{ | ||||
| 			"AssignBitwiseOr", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n BitwiseOr) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseOr) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseOr) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewBitwiseXor(variable node.Node, expression node.Node) node.Node { | ||||
| 	return BitwiseXor{ | ||||
| 		AssignOp{ | ||||
| 			"AssignBitwiseXor", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -19,7 +20,7 @@ func NewBitwiseXor(variable node.Node, expression node.Node) node.Node { | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseXor) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseXor) Name() string { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewConcat(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Concat{ | ||||
| 		AssignOp{ | ||||
| 			"AssignConcat", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Concat) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Concat) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Concat) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewDiv(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Div{ | ||||
| 		AssignOp{ | ||||
| 			"AssignDiv", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Div) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Div) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Div) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewMinus(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Minus{ | ||||
| 		AssignOp{ | ||||
| 			"AssignMinus", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Minus) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Minus) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Minus) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewMod(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Mod{ | ||||
| 		AssignOp{ | ||||
| 			"AssignMod", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Mod) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Mod) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Mod) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewMul(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Mul{ | ||||
| 		AssignOp{ | ||||
| 			"AssignMul", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Mul) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Mul) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Mul) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewPlus(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Plus{ | ||||
| 		AssignOp{ | ||||
| 			"AssignPlus", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Plus) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Plus) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Plus) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewPow(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Pow{ | ||||
| 		AssignOp{ | ||||
| 			"AssignPow", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Pow) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Pow) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Pow) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewShiftLeft(variable node.Node, expression node.Node) node.Node { | ||||
| 	return ShiftLeft{ | ||||
| 		AssignOp{ | ||||
| 			"AssignShiftLeft", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n ShiftLeft) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ShiftLeft) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ShiftLeft) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewShiftRight(variable node.Node, expression node.Node) node.Node { | ||||
| 	return ShiftRight{ | ||||
| 		AssignOp{ | ||||
| 			"AssignShiftRight", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n ShiftRight) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ShiftRight) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ShiftRight) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type BinaryOp struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	left       node.Node | ||||
| 	right      node.Node | ||||
| } | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewBitwiseAnd(variable node.Node, expression node.Node) node.Node { | ||||
| 	return BitwiseAnd{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryBitwiseAnd", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n BitwiseAnd) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseAnd) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseAnd) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewBitwiseOr(variable node.Node, expression node.Node) node.Node { | ||||
| 	return BitwiseOr{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryBitwiseOr", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -19,7 +20,7 @@ func NewBitwiseOr(variable node.Node, expression node.Node) node.Node { | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseOr) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseOr) Name() string { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewBitwiseXor(variable node.Node, expression node.Node) node.Node { | ||||
| 	return BitwiseXor{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryBitwiseXor", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -19,7 +20,7 @@ func NewBitwiseXor(variable node.Node, expression node.Node) node.Node { | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseXor) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseXor) Name() string { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewBooleanAnd(variable node.Node, expression node.Node) node.Node { | ||||
| 	return BooleanAnd{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryBooleanAnd", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n BooleanAnd) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n BooleanAnd) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n BooleanAnd) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewBooleanOr(variable node.Node, expression node.Node) node.Node { | ||||
| 	return BooleanOr{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryBooleanOr", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n BooleanOr) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n BooleanOr) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n BooleanOr) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewCoalesce(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Coalesce{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryCoalesce", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Coalesce) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Coalesce) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Coalesce) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewConcat(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Concat{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryConcat", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Concat) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Concat) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Concat) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewDiv(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Div{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryDiv", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Div) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Div) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Div) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewEqual(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Equal{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryEqual", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Equal) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Equal) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Equal) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewGreater(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Greater{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryGreater", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Greater) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Greater) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Greater) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewGreaterOrEqual(variable node.Node, expression node.Node) node.Node { | ||||
| 	return GreaterOrEqual{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryGreaterOrEqual", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n GreaterOrEqual) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n GreaterOrEqual) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n GreaterOrEqual) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewIdentical(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Identical{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryIdentical", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Identical) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Identical) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Identical) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewLogicalAnd(variable node.Node, expression node.Node) node.Node { | ||||
| 	return LogicalAnd{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryLogicalAnd", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n LogicalAnd) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n LogicalAnd) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n LogicalAnd) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewLogicalOr(variable node.Node, expression node.Node) node.Node { | ||||
| 	return LogicalOr{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryLogicalOr", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n LogicalOr) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n LogicalOr) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n LogicalOr) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewLogicalXor(variable node.Node, expression node.Node) node.Node { | ||||
| 	return LogicalXor{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryLogicalXor", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n LogicalXor) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n LogicalXor) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n LogicalXor) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewMinus(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Minus{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryMinus", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Minus) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Minus) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Minus) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewMod(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Mod{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryMod", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Mod) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Mod) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Mod) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewMul(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Mul{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryMul", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Mul) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Mul) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Mul) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewNotEqual(variable node.Node, expression node.Node) node.Node { | ||||
| 	return NotEqual{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryNotEqual", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n NotEqual) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n NotEqual) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n NotEqual) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewNotIdentical(variable node.Node, expression node.Node) node.Node { | ||||
| 	return NotIdentical{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryNotIdentical", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n NotIdentical) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n NotIdentical) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n NotIdentical) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewPlus(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Plus{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryPlus", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Plus) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Plus) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Plus) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewPow(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Pow{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryPow", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Pow) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Pow) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Pow) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewShiftLeft(variable node.Node, expression node.Node) node.Node { | ||||
| 	return ShiftLeft{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryShiftLeft", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n ShiftLeft) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ShiftLeft) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ShiftLeft) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewShiftRight(variable node.Node, expression node.Node) node.Node { | ||||
| 	return ShiftRight{ | ||||
| 		BinaryOp{ | ||||
| 			"BinaryShiftRight", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n ShiftRight) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ShiftRight) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ShiftRight) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewSmaller(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Smaller{ | ||||
| 		BinaryOp{ | ||||
| 			"BinarySmaller", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Smaller) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Smaller) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Smaller) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewSmallerOrEqual(variable node.Node, expression node.Node) node.Node { | ||||
| 	return SmallerOrEqual{ | ||||
| 		BinaryOp{ | ||||
| 			"BinarySmallerOrEqual", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n SmallerOrEqual) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n SmallerOrEqual) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n SmallerOrEqual) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewSpaceship(variable node.Node, expression node.Node) node.Node { | ||||
| 	return Spaceship{ | ||||
| 		BinaryOp{ | ||||
| 			"BinarySpaceship", | ||||
| 			map[string]interface{}{}, | ||||
| 			variable, | ||||
| 			expression, | ||||
| 		}, | ||||
| @ -23,7 +24,7 @@ func (n Spaceship) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Spaceship) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Spaceship) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type BitwiseNot struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewBitwiseNot(expression node.Node) node.Node { | ||||
| 	return BitwiseNot{ | ||||
| 		"BitwiseNot", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n BitwiseNot) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseNot) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n BitwiseNot) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type BooleanNot struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewBooleanNot(expression node.Node) node.Node { | ||||
| 	return BooleanNot{ | ||||
| 		"BooleanNot", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n BooleanNot) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n BooleanNot) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n BooleanNot) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,5 +6,6 @@ import ( | ||||
| 
 | ||||
| type Cast struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
|  | ||||
| @ -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) { | ||||
|  | ||||
| @ -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) { | ||||
|  | ||||
| @ -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) { | ||||
|  | ||||
| @ -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) { | ||||
|  | ||||
| @ -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) { | ||||
|  | ||||
| @ -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) { | ||||
|  | ||||
| @ -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) { | ||||
|  | ||||
| @ -5,7 +5,7 @@ import ( | ||||
| ) | ||||
| 
 | ||||
| func (n ClassConstFetch) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ClassConstFetch) Name() string { | ||||
| @ -14,6 +14,7 @@ func (n ClassConstFetch) Name() string { | ||||
| 
 | ||||
| type ClassConstFetch struct { | ||||
| 	name         string | ||||
| 	attributes   map[string]interface{} | ||||
| 	class        node.Node | ||||
| 	constantName node.Node | ||||
| } | ||||
| @ -21,6 +22,7 @@ type ClassConstFetch struct { | ||||
| func NewClassConstFetch(class node.Node, constantName node.Node) node.Node { | ||||
| 	return ClassConstFetch{ | ||||
| 		"ClassConstFetch", | ||||
| 		map[string]interface{}{}, | ||||
| 		class, | ||||
| 		constantName, | ||||
| 	} | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type Clone struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewClone(expression node.Node) node.Node { | ||||
| 	return Clone{ | ||||
| 		"Clone", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n Clone) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Clone) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Clone) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -32,7 +32,7 @@ func (n Closure) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Closure) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Closure) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -25,7 +25,7 @@ func (n ClusureUse) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ClusureUse) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ClusureUse) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type ConstFetch struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	constant   node.Node | ||||
| } | ||||
| 
 | ||||
| func NewConstFetch(constant node.Node) node.Node { | ||||
| 	return ConstFetch{ | ||||
| 		"ConstFetch", | ||||
| 		map[string]interface{}{}, | ||||
| 		constant, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n ConstFetch) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ConstFetch) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ConstFetch) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type Empty struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewEmpty(expression node.Node) node.Node { | ||||
| 	return Empty{ | ||||
| 		"Empty", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n Empty) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Empty) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Empty) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type ErrorSuppress struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewErrorSuppress(expression node.Node) node.Node { | ||||
| 	return ErrorSuppress{ | ||||
| 		"ErrorSuppress", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n ErrorSuppress) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ErrorSuppress) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ErrorSuppress) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type Eval struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewEval(expression node.Node) node.Node { | ||||
| 	return Eval{ | ||||
| 		"Eval", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n Eval) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Eval) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Eval) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -25,7 +25,7 @@ func (n Exit) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Exit) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Exit) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type FunctionCall struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	function   node.Node | ||||
| 	arguments  []node.Node | ||||
| } | ||||
| @ -13,6 +14,7 @@ type FunctionCall struct { | ||||
| func NewFunctionCall(function node.Node, arguments []node.Node) node.Node { | ||||
| 	return FunctionCall{ | ||||
| 		"FunctionCall", | ||||
| 		map[string]interface{}{}, | ||||
| 		function, | ||||
| 		arguments, | ||||
| 	} | ||||
| @ -23,7 +25,7 @@ func (n FunctionCall) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n FunctionCall) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n FunctionCall) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type Include struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewInclude(expression node.Node) node.Node { | ||||
| 	return Include{ | ||||
| 		"Include", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n Include) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Include) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Include) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type IncludeOnce struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewIncludeOnce(expression node.Node) node.Node { | ||||
| 	return IncludeOnce{ | ||||
| 		"IncludeOnce", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n IncludeOnce) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n IncludeOnce) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n IncludeOnce) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type InstanceOf struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| 	class      node.Node | ||||
| } | ||||
| @ -13,6 +14,7 @@ type InstanceOf struct { | ||||
| func NewInstanceOf(expr node.Node, class node.Node) node.Node { | ||||
| 	return InstanceOf{ | ||||
| 		"InstanceOf", | ||||
| 		map[string]interface{}{}, | ||||
| 		expr, | ||||
| 		class, | ||||
| 	} | ||||
| @ -23,7 +25,7 @@ func (n InstanceOf) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n InstanceOf) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n InstanceOf) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type Isset struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	variables  []node.Node | ||||
| } | ||||
| 
 | ||||
| func NewIsset(variables []node.Node) node.Node { | ||||
| 	return Isset{ | ||||
| 		"Isset", | ||||
| 		map[string]interface{}{}, | ||||
| 		variables, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n Isset) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Isset) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Isset) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type List struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	items      []node.Node | ||||
| } | ||||
| 
 | ||||
| func NewList(items []node.Node) node.Node { | ||||
| 	return List{ | ||||
| 		"List", | ||||
| 		map[string]interface{}{}, | ||||
| 		items, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n List) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n List) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n List) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type MethodCall struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	variable   node.Node | ||||
| 	method     node.Node | ||||
| 	arguments  []node.Node | ||||
| @ -14,6 +15,7 @@ type MethodCall struct { | ||||
| func NewMethodCall(variable node.Node, method node.Node, arguments []node.Node) node.Node { | ||||
| 	return MethodCall{ | ||||
| 		"MethodCall", | ||||
| 		map[string]interface{}{}, | ||||
| 		variable, | ||||
| 		method, | ||||
| 		arguments, | ||||
| @ -25,7 +27,7 @@ func (n MethodCall) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n MethodCall) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n MethodCall) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type New struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	class      node.Node | ||||
| 	arguments  []node.Node | ||||
| } | ||||
| @ -13,6 +14,7 @@ type New struct { | ||||
| func NewNew(class node.Node, arguments []node.Node) node.Node { | ||||
| 	return New{ | ||||
| 		"New", | ||||
| 		map[string]interface{}{}, | ||||
| 		class, | ||||
| 		arguments, | ||||
| 	} | ||||
| @ -23,7 +25,7 @@ func (n New) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n New) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n New) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type PostDec struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	variable   node.Node | ||||
| } | ||||
| 
 | ||||
| func NewPostDec(variable node.Node) node.Node { | ||||
| 	return PostDec{ | ||||
| 		"PostDec", | ||||
| 		map[string]interface{}{}, | ||||
| 		variable, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n PostDec) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n PostDec) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n PostDec) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type PostInc struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	variable   node.Node | ||||
| } | ||||
| 
 | ||||
| func NewPostInc(variable node.Node) node.Node { | ||||
| 	return PostInc{ | ||||
| 		"PostInc", | ||||
| 		map[string]interface{}{}, | ||||
| 		variable, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n PostInc) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n PostInc) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n PostInc) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type PreDec struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	variable   node.Node | ||||
| } | ||||
| 
 | ||||
| func NewPreDec(variable node.Node) node.Node { | ||||
| 	return PreDec{ | ||||
| 		"PreDec", | ||||
| 		map[string]interface{}{}, | ||||
| 		variable, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n PreDec) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n PreDec) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n PreDec) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type PreInc struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	variable   node.Node | ||||
| } | ||||
| 
 | ||||
| func NewPreInc(variable node.Node) node.Node { | ||||
| 	return PreInc{ | ||||
| 		"PreInc", | ||||
| 		map[string]interface{}{}, | ||||
| 		variable, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n PreInc) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n PreInc) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n PreInc) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type Print struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewPrint(expression node.Node) node.Node { | ||||
| 	return Print{ | ||||
| 		"Print", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n Print) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Print) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Print) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type PropertyFetch struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	variable   node.Node | ||||
| 	property   node.Node | ||||
| } | ||||
| @ -13,6 +14,7 @@ type PropertyFetch struct { | ||||
| func NewPropertyFetch(variable node.Node, property node.Node) node.Node { | ||||
| 	return PropertyFetch{ | ||||
| 		"PropertyFetch", | ||||
| 		map[string]interface{}{}, | ||||
| 		variable, | ||||
| 		property, | ||||
| 	} | ||||
| @ -23,7 +25,7 @@ func (n PropertyFetch) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n PropertyFetch) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n PropertyFetch) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type Require struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewRequire(expression node.Node) node.Node { | ||||
| 	return Require{ | ||||
| 		"Require", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n Require) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Require) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Require) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type RequireOnce struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewRequireOnce(expression node.Node) node.Node { | ||||
| 	return RequireOnce{ | ||||
| 		"RequireOnce", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n RequireOnce) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n RequireOnce) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n RequireOnce) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type ShellExec struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	parts      []node.Node | ||||
| } | ||||
| 
 | ||||
| func NewShellExec(parts []node.Node) node.Node { | ||||
| 	return ShellExec{ | ||||
| 		"ShellExec", | ||||
| 		map[string]interface{}{}, | ||||
| 		parts, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n ShellExec) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ShellExec) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ShellExec) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type ShortArray struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	items      []node.Node | ||||
| } | ||||
| 
 | ||||
| func NewShortArray(items []node.Node) node.Node { | ||||
| 	return ShortArray{ | ||||
| 		"ShortArray", | ||||
| 		map[string]interface{}{}, | ||||
| 		items, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n ShortArray) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ShortArray) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ShortArray) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type ShortList struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	items      []node.Node | ||||
| } | ||||
| 
 | ||||
| func NewShortList(items []node.Node) node.Node { | ||||
| 	return ShortList{ | ||||
| 		"ShortList", | ||||
| 		map[string]interface{}{}, | ||||
| 		items, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n ShortList) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n ShortList) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n ShortList) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type StaticCall struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	class      node.Node | ||||
| 	call       node.Node | ||||
| 	arguments  []node.Node | ||||
| @ -14,6 +15,7 @@ type StaticCall struct { | ||||
| func NewStaticCall(class node.Node, call node.Node, arguments []node.Node) node.Node { | ||||
| 	return StaticCall{ | ||||
| 		"StaticCall", | ||||
| 		map[string]interface{}{}, | ||||
| 		class, | ||||
| 		call, | ||||
| 		arguments, | ||||
| @ -25,7 +27,7 @@ func (n StaticCall) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n StaticCall) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n StaticCall) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type StaticPropertyFetch struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	class      node.Node | ||||
| 	property   node.Node | ||||
| } | ||||
| @ -13,6 +14,7 @@ type StaticPropertyFetch struct { | ||||
| func NewStaticPropertyFetch(class node.Node, property node.Node) node.Node { | ||||
| 	return StaticPropertyFetch{ | ||||
| 		"StaticPropertyFetch", | ||||
| 		map[string]interface{}{}, | ||||
| 		class, | ||||
| 		property, | ||||
| 	} | ||||
| @ -23,7 +25,7 @@ func (n StaticPropertyFetch) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n StaticPropertyFetch) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n StaticPropertyFetch) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type Ternary struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	condition  node.Node | ||||
| 	ifTrue     node.Node | ||||
| 	ifFalse    node.Node | ||||
| @ -14,6 +15,7 @@ type Ternary struct { | ||||
| func NewTernary(condition node.Node, ifTrue node.Node, ifFalse node.Node) node.Node { | ||||
| 	return Ternary{ | ||||
| 		"Ternary", | ||||
| 		map[string]interface{}{}, | ||||
| 		condition, | ||||
| 		ifTrue, | ||||
| 		ifFalse, | ||||
| @ -25,7 +27,7 @@ func (n Ternary) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Ternary) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Ternary) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type UnaryMinus struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewUnaryMinus(expression node.Node) node.Node { | ||||
| 	return UnaryMinus{ | ||||
| 		"UnaryMinus", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n UnaryMinus) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n UnaryMinus) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n UnaryMinus) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type UnaryPlus struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewUnaryPlus(expression node.Node) node.Node { | ||||
| 	return UnaryPlus{ | ||||
| 		"UnaryPlus", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n UnaryPlus) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n UnaryPlus) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n UnaryPlus) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type Variable struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	varName    node.Node | ||||
| } | ||||
| 
 | ||||
| func NewVariable(varName node.Node) node.Node { | ||||
| 	return Variable{ | ||||
| 		"Variable", | ||||
| 		map[string]interface{}{}, | ||||
| 		varName, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n Variable) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Variable) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Variable) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 
 | ||||
| type Yield struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	key        node.Node | ||||
| 	value      node.Node | ||||
| } | ||||
| @ -13,6 +14,7 @@ type Yield struct { | ||||
| func NewYield(key node.Node, value node.Node) node.Node { | ||||
| 	return Yield{ | ||||
| 		"Yield", | ||||
| 		map[string]interface{}{}, | ||||
| 		key, | ||||
| 		value, | ||||
| 	} | ||||
| @ -23,7 +25,7 @@ func (n Yield) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Yield) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Yield) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type YieldFrom struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       node.Node | ||||
| } | ||||
| 
 | ||||
| func NewYieldFrom(expression node.Node) node.Node { | ||||
| 	return YieldFrom{ | ||||
| 		"YieldFrom", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n YieldFrom) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n YieldFrom) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n YieldFrom) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewFullyQualified(parts []node.Node) node.Node { | ||||
| 	return FullyQualified{ | ||||
| 		NameNode{ | ||||
| 			"FullyQualifiedName", | ||||
| 			map[string]interface{}{}, | ||||
| 			parts, | ||||
| 		}, | ||||
| 	} | ||||
| @ -22,5 +23,5 @@ func (n FullyQualified) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n FullyQualified) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type NameNode struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	parts      []node.Node | ||||
| } | ||||
| 
 | ||||
| func NewName(parts []node.Node) node.Node { | ||||
| 	return NameNode{ | ||||
| 		"Name", | ||||
| 		map[string]interface{}{}, | ||||
| 		parts, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n NameNode) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n NameNode) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n NameNode) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -12,6 +12,7 @@ func NewRelative(parts []node.Node) node.Node { | ||||
| 	return Relative{ | ||||
| 		NameNode{ | ||||
| 			"RelativeName", | ||||
| 			map[string]interface{}{}, | ||||
| 			parts, | ||||
| 		}, | ||||
| 	} | ||||
| @ -22,5 +23,5 @@ func (n Relative) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Relative) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
|  | ||||
| @ -2,12 +2,14 @@ package node | ||||
| 
 | ||||
| type Nullable struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	expr       Node | ||||
| } | ||||
| 
 | ||||
| func NewNullable(expression Node) Node { | ||||
| 	return Nullable{ | ||||
| 		"Nullable", | ||||
| 		map[string]interface{}{}, | ||||
| 		expression, | ||||
| 	} | ||||
| } | ||||
| @ -17,7 +19,7 @@ func (n Nullable) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Nullable) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Nullable) Walk(v Visitor) { | ||||
|  | ||||
| @ -23,7 +23,7 @@ func (n Dnumber) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Dnumber) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Dnumber) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -6,12 +6,14 @@ import ( | ||||
| 
 | ||||
| type Encapsed struct { | ||||
| 	name       string | ||||
| 	attributes map[string]interface{} | ||||
| 	parts      []node.Node | ||||
| } | ||||
| 
 | ||||
| func NewEncapsed(parts []node.Node) node.Node { | ||||
| 	return Encapsed{ | ||||
| 		"Encapsed", | ||||
| 		map[string]interface{}{}, | ||||
| 		parts, | ||||
| 	} | ||||
| } | ||||
| @ -21,7 +23,7 @@ func (n Encapsed) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n Encapsed) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n Encapsed) Walk(v node.Visitor) { | ||||
|  | ||||
| @ -23,7 +23,7 @@ func (n EncapsedStringPart) Name() string { | ||||
| } | ||||
| 
 | ||||
| func (n EncapsedStringPart) Attributes() map[string]interface{} { | ||||
| 	return nil | ||||
| 	return n.attributes | ||||
| } | ||||
| 
 | ||||
| func (n EncapsedStringPart) Walk(v node.Visitor) { | ||||
|  | ||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user