pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:2379:      create_arg: modifiers simple_type optional_dot_dot_dot TOK_IDENTIFIER    {    struct pike_type *type;    int ref_no;       if (Pike_compiler->num_create_args < 0) {    yyerror("Can't define more variables after ...");    }    -  push_finished_type(Pike_compiler->compiler_frame->current_type); +     if ($3) { -  +  push_finished_type(Pike_compiler->compiler_frame->current_type);    push_type(T_ARRAY); -  +  type = compiler_pop_type(); +  } else { +  copy_pike_type(type, Pike_compiler->compiler_frame->current_type);    } -  type=compiler_pop_type(); +        /* Add the identifier globally.    * Note: Since these are the first identifiers (and references)    * to be added to the program, they will be numbered in    * sequence starting at 0 (zero). This means that the    * counter num_create_args is sufficient extra information    * to be able to keep track of them.    */    ref_no = define_variable($4->u.sval.u.string, type,    Pike_compiler->current_modifiers);