Branch: Tag:

1998-07-19

1998-07-19 22:50:44 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved and error message.
Added some FIXME's.

Rev: src/las.c:1.64

4:   ||| 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"
609:    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;   
637:    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);    }    }