input.set_current_file(0);
input.set_current_token_chain(0);
- p->synthetic = true;
+ if(p) p->synthetic = true;
return p;
}
}
t = peek();
+ if(!t)
+ throw PARSE_ERROR (_("expected '{'"));
if (t->type == tok_operator && t->content == ":")
{
swallow();
s->tok = t;
t = peek ();
+ if(!t)
+ throw PARSE_ERROR (_("expected ';', '}' or an expression statement"));
if (t->type == tok_operator && (t->content == ";" || t->content == "}"))
s->value = NULL; // no return value
else