|
1 | 1 | package ast
|
2 | 2 |
|
3 | 3 | import (
|
4 |
| - "reflect" |
| 4 | + "github.com/antonmedv/expr/internal/helper" |
5 | 5 | )
|
6 | 6 |
|
7 |
| -func (n *NilNode) SetType(t reflect.Type) { |
8 |
| - n.t = t |
| 7 | +func (n *NilNode) SetLocation(l helper.Location) { |
| 8 | + n.l = l |
9 | 9 | }
|
10 | 10 |
|
11 |
| -func (n *NilNode) GetType() reflect.Type { |
12 |
| - return n.t |
| 11 | +func (n *NilNode) GetLocation() helper.Location { |
| 12 | + return n.l |
13 | 13 | }
|
14 | 14 |
|
15 |
| -func (n *IdentifierNode) SetType(t reflect.Type) { |
16 |
| - n.t = t |
| 15 | +func (n *IdentifierNode) SetLocation(l helper.Location) { |
| 16 | + n.l = l |
17 | 17 | }
|
18 | 18 |
|
19 |
| -func (n *IdentifierNode) GetType() reflect.Type { |
20 |
| - return n.t |
| 19 | +func (n *IdentifierNode) GetLocation() helper.Location { |
| 20 | + return n.l |
21 | 21 | }
|
22 | 22 |
|
23 |
| -func (n *IntegerNode) SetType(t reflect.Type) { |
24 |
| - n.t = t |
| 23 | +func (n *IntegerNode) SetLocation(l helper.Location) { |
| 24 | + n.l = l |
25 | 25 | }
|
26 | 26 |
|
27 |
| -func (n *IntegerNode) GetType() reflect.Type { |
28 |
| - return n.t |
| 27 | +func (n *IntegerNode) GetLocation() helper.Location { |
| 28 | + return n.l |
29 | 29 | }
|
30 | 30 |
|
31 |
| -func (n *FloatNode) SetType(t reflect.Type) { |
32 |
| - n.t = t |
| 31 | +func (n *FloatNode) SetLocation(l helper.Location) { |
| 32 | + n.l = l |
33 | 33 | }
|
34 | 34 |
|
35 |
| -func (n *FloatNode) GetType() reflect.Type { |
36 |
| - return n.t |
| 35 | +func (n *FloatNode) GetLocation() helper.Location { |
| 36 | + return n.l |
37 | 37 | }
|
38 | 38 |
|
39 |
| -func (n *BoolNode) SetType(t reflect.Type) { |
40 |
| - n.t = t |
| 39 | +func (n *BoolNode) SetLocation(l helper.Location) { |
| 40 | + n.l = l |
41 | 41 | }
|
42 | 42 |
|
43 |
| -func (n *BoolNode) GetType() reflect.Type { |
44 |
| - return n.t |
| 43 | +func (n *BoolNode) GetLocation() helper.Location { |
| 44 | + return n.l |
45 | 45 | }
|
46 | 46 |
|
47 |
| -func (n *StringNode) SetType(t reflect.Type) { |
48 |
| - n.t = t |
| 47 | +func (n *StringNode) SetLocation(l helper.Location) { |
| 48 | + n.l = l |
49 | 49 | }
|
50 | 50 |
|
51 |
| -func (n *StringNode) GetType() reflect.Type { |
52 |
| - return n.t |
| 51 | +func (n *StringNode) GetLocation() helper.Location { |
| 52 | + return n.l |
53 | 53 | }
|
54 | 54 |
|
55 |
| -func (n *UnaryNode) SetType(t reflect.Type) { |
56 |
| - n.t = t |
| 55 | +func (n *UnaryNode) SetLocation(l helper.Location) { |
| 56 | + n.l = l |
57 | 57 | }
|
58 | 58 |
|
59 |
| -func (n *UnaryNode) GetType() reflect.Type { |
60 |
| - return n.t |
| 59 | +func (n *UnaryNode) GetLocation() helper.Location { |
| 60 | + return n.l |
61 | 61 | }
|
62 | 62 |
|
63 |
| -func (n *BinaryNode) SetType(t reflect.Type) { |
64 |
| - n.t = t |
| 63 | +func (n *BinaryNode) SetLocation(l helper.Location) { |
| 64 | + n.l = l |
65 | 65 | }
|
66 | 66 |
|
67 |
| -func (n *BinaryNode) GetType() reflect.Type { |
68 |
| - return n.t |
| 67 | +func (n *BinaryNode) GetLocation() helper.Location { |
| 68 | + return n.l |
69 | 69 | }
|
70 | 70 |
|
71 |
| -func (n *MatchesNode) SetType(t reflect.Type) { |
72 |
| - n.t = t |
| 71 | +func (n *MatchesNode) SetLocation(l helper.Location) { |
| 72 | + n.l = l |
73 | 73 | }
|
74 | 74 |
|
75 |
| -func (n *MatchesNode) GetType() reflect.Type { |
76 |
| - return n.t |
| 75 | +func (n *MatchesNode) GetLocation() helper.Location { |
| 76 | + return n.l |
77 | 77 | }
|
78 | 78 |
|
79 |
| -func (n *PropertyNode) SetType(t reflect.Type) { |
80 |
| - n.t = t |
| 79 | +func (n *PropertyNode) SetLocation(l helper.Location) { |
| 80 | + n.l = l |
81 | 81 | }
|
82 | 82 |
|
83 |
| -func (n *PropertyNode) GetType() reflect.Type { |
84 |
| - return n.t |
| 83 | +func (n *PropertyNode) GetLocation() helper.Location { |
| 84 | + return n.l |
85 | 85 | }
|
86 | 86 |
|
87 |
| -func (n *IndexNode) SetType(t reflect.Type) { |
88 |
| - n.t = t |
| 87 | +func (n *IndexNode) SetLocation(l helper.Location) { |
| 88 | + n.l = l |
89 | 89 | }
|
90 | 90 |
|
91 |
| -func (n *IndexNode) GetType() reflect.Type { |
92 |
| - return n.t |
| 91 | +func (n *IndexNode) GetLocation() helper.Location { |
| 92 | + return n.l |
93 | 93 | }
|
94 | 94 |
|
95 |
| -func (n *MethodNode) SetType(t reflect.Type) { |
96 |
| - n.t = t |
| 95 | +func (n *MethodNode) SetLocation(l helper.Location) { |
| 96 | + n.l = l |
97 | 97 | }
|
98 | 98 |
|
99 |
| -func (n *MethodNode) GetType() reflect.Type { |
100 |
| - return n.t |
| 99 | +func (n *MethodNode) GetLocation() helper.Location { |
| 100 | + return n.l |
101 | 101 | }
|
102 | 102 |
|
103 |
| -func (n *FunctionNode) SetType(t reflect.Type) { |
104 |
| - n.t = t |
| 103 | +func (n *FunctionNode) SetLocation(l helper.Location) { |
| 104 | + n.l = l |
105 | 105 | }
|
106 | 106 |
|
107 |
| -func (n *FunctionNode) GetType() reflect.Type { |
108 |
| - return n.t |
| 107 | +func (n *FunctionNode) GetLocation() helper.Location { |
| 108 | + return n.l |
109 | 109 | }
|
110 | 110 |
|
111 |
| -func (n *BuiltinNode) SetType(t reflect.Type) { |
112 |
| - n.t = t |
| 111 | +func (n *BuiltinNode) SetLocation(l helper.Location) { |
| 112 | + n.l = l |
113 | 113 | }
|
114 | 114 |
|
115 |
| -func (n *BuiltinNode) GetType() reflect.Type { |
116 |
| - return n.t |
| 115 | +func (n *BuiltinNode) GetLocation() helper.Location { |
| 116 | + return n.l |
117 | 117 | }
|
118 | 118 |
|
119 |
| -func (n *ClosureNode) SetType(t reflect.Type) { |
120 |
| - n.t = t |
| 119 | +func (n *ClosureNode) SetLocation(l helper.Location) { |
| 120 | + n.l = l |
121 | 121 | }
|
122 | 122 |
|
123 |
| -func (n *ClosureNode) GetType() reflect.Type { |
124 |
| - return n.t |
| 123 | +func (n *ClosureNode) GetLocation() helper.Location { |
| 124 | + return n.l |
125 | 125 | }
|
126 | 126 |
|
127 |
| -func (n *PointerNode) SetType(t reflect.Type) { |
128 |
| - n.t = t |
| 127 | +func (n *PointerNode) SetLocation(l helper.Location) { |
| 128 | + n.l = l |
129 | 129 | }
|
130 | 130 |
|
131 |
| -func (n *PointerNode) GetType() reflect.Type { |
132 |
| - return n.t |
| 131 | +func (n *PointerNode) GetLocation() helper.Location { |
| 132 | + return n.l |
133 | 133 | }
|
134 | 134 |
|
135 |
| -func (n *ConditionalNode) SetType(t reflect.Type) { |
136 |
| - n.t = t |
| 135 | +func (n *ConditionalNode) SetLocation(l helper.Location) { |
| 136 | + n.l = l |
137 | 137 | }
|
138 | 138 |
|
139 |
| -func (n *ConditionalNode) GetType() reflect.Type { |
140 |
| - return n.t |
| 139 | +func (n *ConditionalNode) GetLocation() helper.Location { |
| 140 | + return n.l |
141 | 141 | }
|
142 | 142 |
|
143 |
| -func (n *ArrayNode) SetType(t reflect.Type) { |
144 |
| - n.t = t |
| 143 | +func (n *ArrayNode) SetLocation(l helper.Location) { |
| 144 | + n.l = l |
145 | 145 | }
|
146 | 146 |
|
147 |
| -func (n *ArrayNode) GetType() reflect.Type { |
148 |
| - return n.t |
| 147 | +func (n *ArrayNode) GetLocation() helper.Location { |
| 148 | + return n.l |
149 | 149 | }
|
150 | 150 |
|
151 |
| -func (n *MapNode) SetType(t reflect.Type) { |
152 |
| - n.t = t |
| 151 | +func (n *MapNode) SetLocation(l helper.Location) { |
| 152 | + n.l = l |
153 | 153 | }
|
154 | 154 |
|
155 |
| -func (n *MapNode) GetType() reflect.Type { |
156 |
| - return n.t |
| 155 | +func (n *MapNode) GetLocation() helper.Location { |
| 156 | + return n.l |
157 | 157 | }
|
158 | 158 |
|
159 |
| -func (n *PairNode) GetType() reflect.Type { |
160 |
| - return n.t |
| 159 | +func (n *PairNode) GetLocation() helper.Location { |
| 160 | + return n.l |
161 | 161 | }
|
162 | 162 |
|
163 |
| -func (n *PairNode) SetType(t reflect.Type) { |
164 |
| - n.t = t |
| 163 | +func (n *PairNode) SetLocation(l helper.Location) { |
| 164 | + n.l = l |
165 | 165 | }
|
0 commit comments