{
script_scan_get_next_token (scan);
key = script_parse_exp (scan);
+ if (!key)
+ {
+ script_parse_error (&curtoken->location,
+ "Expected a valid index expression");
+ return NULL;
+ }
curtoken = script_scan_get_current_token (scan);
if (!script_scan_token_is_symbol_of_value (curtoken, ']'))
{
if (!script_scan_token_is_symbol_of_value (curtoken, ';'))
{
script_parse_error (&curtoken->location,
- "Expected a ';' after a do-whileexpression");
+ "Expected a ';' after a do-while expression");
return NULL;
}
script_scan_get_next_token (scan);