pike.git / src / docode.c

version» Context lines:

pike.git/src/docode.c:37:    struct cleanup_frame *prev;    cleanup_func cleanup;    void *cleanup_arg;    int stack_depth;   };      struct statement_label_name   {    struct statement_label_name *next;    struct pike_string *str; +  struct pike_string *file;    INT_TYPE line_number;    int used;   };      struct statement_label   {    struct statement_label *prev;    struct statement_label_name *name;    /* -2 in break_label is used to flag "open" statement_label entries.    * If an open entry is on top of the stack, it's used instead of a
pike.git/src/docode.c:2387:    }       case F_NORMAL_STMT_LABEL:    case F_CUSTOM_STMT_LABEL: {    struct statement_label *label;    struct statement_label_name name;    BLOCK_BEGIN;    PUSH_STATEMENT_LABEL;    name.str = CAR(n)->u.sval.u.string;    name.line_number = n->line_number; +  name.file = n->current_file;    name.used = 0;       for (label = current_label; label; label = label->prev) {    struct statement_label_name *lbl_name;    for (lbl_name = label->name; lbl_name; lbl_name = lbl_name->next)    if (lbl_name->str == name.str) {    INT_TYPE save_line = c->lex.current_line; -  +  struct pike_string *save_file = c->lex.current_file;    c->lex.current_line = name.line_number; -  +  c->lex.current_file = name.file;    my_yyerror("Duplicate nested labels, previous one on line %d.",    lbl_name->line_number);    c->lex.current_line = save_line; -  +  c->lex.current_file = save_file;    goto label_check_done;    }    }    label_check_done:       name.next = current_label->name;    current_label->name = &name;       if (!name.next) {    if (n->token == F_CUSTOM_STMT_LABEL)