pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: las.c,v 1.65 1998/08/05 22:48:01 hubbe Exp $"); + RCSID("$Id: las.c,v 1.66 1998/08/29 22:15:17 grubba Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:673:    pop_stack();    push_int(0);       case T_PROGRAM:    break;    }   }          - node *index_node(node *n, struct pike_string * id) + node *index_node(node *n, char *node_name, struct pike_string *id)   {    node *ret;    JMP_BUF tmp;       check_tree(n,0);       if(SETJMP(tmp))    {    ONERROR tmp;    SET_ONERROR(tmp,exit_on_error,"Error in handle_error in master object!");    assign_svalue_no_free(sp++, & throw_value);    APPLY_MASTER("handle_error", 1);    pop_stack();    UNSET_ONERROR(tmp);    -  +  if (node_name) { +  my_yyerror("Couldn't index module '%s'.", node_name); +  } else {    yyerror("Couldn't index module."); -  +  }    push_int(0);    }else{    resolv_constant(n);    switch(sp[-1].type)    {    case T_INT: -  if(!num_parse_error) +  if(!num_parse_error) { +  if (node_name) { +  my_yyerror("Failed to index module '%s' (module doesn't exist?)", +  node_name); +  } else {    yyerror("Failed to index module (module doesn't exist?)"); -  +  } +  }    break;       case T_PROGRAM:    case T_FLOAT:    case T_STRING:    case T_ARRAY: -  +  if (node_name) { +  my_yyerror("Failed to index module '%s' (Not a module?)", +  node_name); +  } else {    yyerror("Failed to index module (Not a module?)"); -  +  }    pop_stack();    push_int(0);    break;       default:    {    DECLARE_CYCLIC();    if(BEGIN_CYCLIC(sp[-1].u.refs, id))    {    my_yyerror("Recursive module dependency in '%s'.",id->str);
pike.git/src/las.c:726:    push_int(0);    }else{    SET_CYCLIC_RET(1);    ref_push_string(id);    f_index(2);       if(sp[-1].type == T_INT &&    !sp[-1].u.integer &&    sp[-1].subtype==NUMBER_UNDEFINED)    { -  my_yyerror("Index '%s' not present in module.",id->str); +  if (node_name) { +  my_yyerror("Index '%s' not present in module '%s'.", +  id->str, node_name); +  } else { +  my_yyerror("Index '%s' not present in module.", id->str);    } -  +  }    END_CYCLIC();    }    }    }    }    UNSETJMP(tmp);    ret=mkconstantsvaluenode(sp-1);    pop_stack();    return ret;   }