Branch: Tag:

2000-03-17

2000-03-17 05:13:17 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

better error messages (I hope)

Rev: src/builtin_functions.c:1.244
Rev: src/las.c:1.170
Rev: src/pike_types.c:1.127
Rev: src/pike_types.h:1.37
Rev: src/program.c:1.213
Rev: src/program.h:1.83

5:   \*/   /**/   #include "global.h" - RCSID("$Id: pike_types.c,v 1.126 2000/03/10 00:58:59 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.127 2000/03/17 05:13:17 hubbe Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"
3460:         void yyexplain_nonmatching_types(struct pike_string *type_a, -  struct pike_string *type_b) +  struct pike_string *type_b, +  int flags)   {    implements_a=0;    implements_b=0;
3474:    struct pike_string *s1,*s2;    s1=describe_type(type_a);    s2=describe_type(type_b); +  if(flags & YYTE_IS_WARNING) +  { +  yywarning("Expected: %s",s1->str); +  yywarning("Got : %s",s2->str); +  }else{    my_yyerror("Expected: %s",s1->str);    my_yyerror("Got : %s",s2->str); -  +  }    free_string(s1);    free_string(s2);    }       if(implements_a && implements_b) -  yyexplain_not_implements(implements_a,implements_b); +  yyexplain_not_implements(implements_a,implements_b,flags);   }