Make the ice a little more informative.
This commit is contained in:
parent
f58c2fef5a
commit
71b3d30aa1
|
@ -211,6 +211,7 @@ typedef struct expr_s {
|
||||||
} expr_t;
|
} expr_t;
|
||||||
|
|
||||||
extern struct type_s *ev_types[];
|
extern struct type_s *ev_types[];
|
||||||
|
extern const char *expr_names[];
|
||||||
|
|
||||||
/** Report a type mismatch error.
|
/** Report a type mismatch error.
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
#include "qc-parse.h"
|
#include "qc-parse.h"
|
||||||
#include "strpool.h"
|
#include "strpool.h"
|
||||||
|
|
||||||
static const char *expr_names[] =
|
const char *expr_names[] =
|
||||||
{
|
{
|
||||||
"error",
|
"error",
|
||||||
"state",
|
"state",
|
||||||
|
|
|
@ -1017,7 +1017,8 @@ statement_subexpr (sblock_t *sblock, expr_t *e, operand_t **op)
|
||||||
if (e->type > ex_value)
|
if (e->type > ex_value)
|
||||||
internal_error (e, "bad expression type");
|
internal_error (e, "bad expression type");
|
||||||
if (!sfuncs[e->type])
|
if (!sfuncs[e->type])
|
||||||
internal_error (e, "unexpected expression type");
|
internal_error (e, "unexpected expression type; %s",
|
||||||
|
expr_names[e->type]);
|
||||||
|
|
||||||
sblock = sfuncs[e->type] (sblock, e, op);
|
sblock = sfuncs[e->type] (sblock, e, op);
|
||||||
return sblock;
|
return sblock;
|
||||||
|
|
Loading…
Reference in New Issue