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.63 1998/06/06 03:27:25 hubbe Exp $"); + RCSID("$Id: las.c,v 1.64 1998/07/19 22:50:44 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:602:    }    numid=n->u.integer.b;    break;       case F_IDENTIFIER:    p=new_program;    numid=n->u.number;    break;       case F_LOCAL: +  /* FIXME: Ought to have the name of the identifier in the message. */    yyerror("Expected constant, got local variable");    push_int(0);    return;       case F_GLOBAL: -  +  /* FIXME: Ought to have the name of the identifier in the message. */    yyerror("Expected constant, got global variable");    push_int(0);    return;       case F_UNDEFINED: -  if(compiler_pass==2) +  if(compiler_pass==2) { +  /* FIXME: Ought to have the name of the identifier in the message. */    yyerror("Expected constant, got undefined identifier"); -  +  }    push_int(0);    return;       default:    yyerror("Expected constant, got something else");    push_int(0);    return;    }       i=ID_FROM_INT(p, numid);       if(IDENTIFIER_IS_CONSTANT(i->identifier_flags))    {    push_svalue(PROG_FROM_INT(p, numid)->constants +    i->func.offset);    }else{ -  yyerror("Identifier is not a constant"); +  my_yyerror("Identifier '%s' is not a constant", i->name->str);    push_int(0);    }    }   }      void resolv_program(node *n)   {    check_tree(n,0);       resolv_constant(n);