static bool type_check (struct expression *, union any_node **,
enum expr_type expected_type);
static union any_node *allocate_unary_variable (struct expression *,
- struct variable *);
+ const struct variable *);
\f
/* Public functions. */
if (lex_token (lexer) == T_ID
&& toupper (lex_look_ahead (lexer)) == 'T')
{
- struct variable **vars;
+ const struct variable **vars;
size_t var_cnt;
size_t i;
- if (!parse_variables (lexer, dataset_dict (e->ds), &vars, &var_cnt, PV_SINGLE))
+ if (!parse_variables_const (lexer, dataset_dict (e->ds), &vars, &var_cnt, PV_SINGLE))
goto fail;
for (i = 0; i < var_cnt; i++)
add_arg (&args, &arg_cnt, &arg_cap,
}
union any_node *
-expr_allocate_variable (struct expression *e, struct variable *v)
+expr_allocate_variable (struct expression *e, const struct variable *v)
{
union any_node *n = pool_alloc (e->expr_pool, sizeof n->variable);
n->type = var_is_numeric (v) ? OP_num_var : OP_str_var;
/* Allocates a unary composite node that represents the value of
variable V in expression E. */
static union any_node *
-allocate_unary_variable (struct expression *e, struct variable *v)
+allocate_unary_variable (struct expression *e, const struct variable *v)
{
assert (v != NULL);
return expr_allocate_unary (e, var_is_numeric (v) ? OP_NUM_VAR : OP_STR_VAR,