Mercurial > hg > octave-lyh
comparison src/pt-assign.h @ 8037:0be8cf23b95c
check for obsolete built-in variable assignment at first execution rather than parse time
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 19 Aug 2008 14:09:24 -0400 |
parents | 3100283874d7 |
children | 73c4516fae10 |
comparison
equal
deleted
inserted
replaced
8036:854683691d7a | 8037:0be8cf23b95c |
---|---|
45 { | 45 { |
46 public: | 46 public: |
47 | 47 |
48 tree_simple_assignment (bool plhs = false, int l = -1, int c = -1, | 48 tree_simple_assignment (bool plhs = false, int l = -1, int c = -1, |
49 octave_value::assign_op t = octave_value::op_asn_eq) | 49 octave_value::assign_op t = octave_value::op_asn_eq) |
50 : tree_expression (l, c), lhs (0), rhs (0), preserve (plhs), etype (t) { } | 50 : tree_expression (l, c), lhs (0), rhs (0), preserve (plhs), etype (t), |
51 first_execution (true) { } | |
51 | 52 |
52 tree_simple_assignment (tree_expression *le, tree_expression *re, | 53 tree_simple_assignment (tree_expression *le, tree_expression *re, |
53 bool plhs = false, int l = -1, int c = -1, | 54 bool plhs = false, int l = -1, int c = -1, |
54 octave_value::assign_op t = octave_value::op_asn_eq); | 55 octave_value::assign_op t = octave_value::op_asn_eq); |
55 | 56 |
98 bool ans_ass; | 99 bool ans_ass; |
99 | 100 |
100 // The type of the expression. | 101 // The type of the expression. |
101 octave_value::assign_op etype; | 102 octave_value::assign_op etype; |
102 | 103 |
104 // true only on first rvalue() call. | |
105 bool first_execution; | |
106 | |
103 // No copying! | 107 // No copying! |
104 | 108 |
105 tree_simple_assignment (const tree_simple_assignment&); | 109 tree_simple_assignment (const tree_simple_assignment&); |
106 | 110 |
107 tree_simple_assignment& operator = (const tree_simple_assignment&); | 111 tree_simple_assignment& operator = (const tree_simple_assignment&); |
114 { | 118 { |
115 public: | 119 public: |
116 | 120 |
117 tree_multi_assignment (bool plhs = false, int l = -1, int c = -1, | 121 tree_multi_assignment (bool plhs = false, int l = -1, int c = -1, |
118 octave_value::assign_op t = octave_value::op_asn_eq) | 122 octave_value::assign_op t = octave_value::op_asn_eq) |
119 : tree_expression (l, c), lhs (0), rhs (0), preserve (plhs), etype(t) { } | 123 : tree_expression (l, c), lhs (0), rhs (0), preserve (plhs), etype(t), |
124 first_execution (true) { } | |
120 | 125 |
121 tree_multi_assignment (tree_argument_list *lst, tree_expression *r, | 126 tree_multi_assignment (tree_argument_list *lst, tree_expression *r, |
122 bool plhs = false, int l = -1, int c = -1, | 127 bool plhs = false, int l = -1, int c = -1, |
123 octave_value::assign_op t = octave_value::op_asn_eq); | 128 octave_value::assign_op t = octave_value::op_asn_eq); |
124 | 129 |
159 bool preserve; | 164 bool preserve; |
160 | 165 |
161 // The type of the expression. | 166 // The type of the expression. |
162 octave_value::assign_op etype; | 167 octave_value::assign_op etype; |
163 | 168 |
169 // true only on first rvalue() call. | |
170 bool first_execution; | |
171 | |
164 // No copying! | 172 // No copying! |
165 | 173 |
166 tree_multi_assignment (const tree_multi_assignment&); | 174 tree_multi_assignment (const tree_multi_assignment&); |
167 | 175 |
168 tree_multi_assignment& operator = (const tree_multi_assignment&); | 176 tree_multi_assignment& operator = (const tree_multi_assignment&); |