@@ -62,22 +62,22 @@ extern char *stats_file;
6262/* variable **references** */
6363/* this is used to record a reference to a variable in the code,
6464 not it's value. So this might be A or A$ or A(1,2).
65- The current value is held in a separate variable_storage_t
65+ The current value is held in a separate variable_value_t
6666 in the variable_values list of the interpreter_state.
6767 */
6868typedef struct {
6969 char * name ;
7070 list_t * subscripts ; // subscripts, list of expressions
7171 list_t * slicing ; // up to two expressions holding string slicing limits
72- } variable_t ;
72+ } variable_reference_t ;
7373
7474/* either_t is used within variable_value_t for the actual data */
7575typedef union {
7676 char * string ;
7777 double number ;
7878} either_t ;
7979
80- /* variable_storage_t holds the *value* of a variable in memory, it is a variable_t */
80+ /* variable_value_t holds the *value* of a variable in memory, it is a variable_reference_t */
8181typedef struct {
8282 int type ; // NUMBER, STRING
8383 list_t * actual_dimensions ; // actual dimensions, even if auto-DIMmed
@@ -95,7 +95,7 @@ typedef struct expression_struct {
9595 union {
9696 double number ;
9797 char * string ;
98- variable_t * variable ; // also used for user-defined function names and parameters
98+ variable_reference_t * variable ; // also used for user-defined function names and parameters
9999 struct {
100100 int arity ;
101101 int opcode ;
@@ -122,12 +122,12 @@ typedef struct statement_struct {
122122 union {
123123 expression_t * generic_parameter , * generic_parameter2 , * generic_parameter3 ;
124124 struct {
125- variable_t * var1 ;
126- variable_t * var2 ;
125+ variable_reference_t * var1 ;
126+ variable_reference_t * var2 ;
127127 } change ;
128128 list_t * data ; // list of values for data statements
129129 struct {
130- variable_t * signature ;
130+ variable_reference_t * signature ;
131131 expression_t * formula ;
132132 } def ;
133133 struct {
@@ -136,7 +136,7 @@ typedef struct statement_struct {
136136 } deftype ;
137137 list_t * dim ; // list of variable definitions
138138 struct {
139- variable_t * variable ;
139+ variable_reference_t * variable ;
140140 expression_t * begin , * end , * step ;
141141 } _for ;
142142 expression_t * gosub ;
@@ -148,7 +148,7 @@ typedef struct statement_struct {
148148 } _if ;
149149 list_t * input ;
150150 struct {
151- variable_t * variable ;
151+ variable_reference_t * variable ;
152152 expression_t * expression ;
153153 } let ;
154154 struct {
@@ -176,7 +176,7 @@ typedef struct statement_struct {
176176 */
177177typedef struct {
178178 list_t * head ;
179- variable_t * index_variable ;
179+ variable_reference_t * index_variable ;
180180 double begin , end , step ;
181181} forcontrol_t ;
182182
@@ -207,7 +207,7 @@ typedef struct {
207207extern interpreterstate_t interpreter_state ;
208208
209209/* the only piece of the interpreter the parser needs to know about is the variable table */
210- void insert_variable (const variable_t * variable );
210+ void insert_variable (const variable_reference_t * variable );
211211
212212/* called by main to set up the interpreter state */
213213void interpreter_setup (void );
0 commit comments