pike.git/
src/
las.c
Branch:
Tag:
Non-build tags
All tags
No tags
1999-07-07
1999-07-07 01:02:38 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
c5c2ffee86c77004037a1cd751595a8f75859ab3 (
27
lines) (+
25
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
made constant resolving much more lenient...
Rev: src/las.c:1.82
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: las.c,v 1.
81
1999/
06
/
03
01:
39
:
35
hubbe Exp $");
+
RCSID("$Id: las.c,v 1.
82
1999/
07
/
07
01:
02
:
38
hubbe Exp $");
#include "language.h" #include "interpret.h"
662:
return; default:
-
yyerror("Expected constant, got something else");
+
{
+
char fnord[1000];
+
if(is_const(n))
+
{
+
int args=eval_low(n);
+
if(args==1) return;
+
+
if(args!=-1)
+
{
+
if(!args)
+
{
+
yyerror("Expected constant, got
void expression");
+
}else{
+
yyerror("Possible internal error!!!");
+
pop_n_elems(args-1);
+
return;
+
}
+
}
+
}
+
+
sprintf(fnord,"Expected constant, got
something else
(%d)
"
,n->token
);
+
yyerror(fnord);
push_int(0); return; }
-
+
}
i=ID_FROM_INT(p, numid);