*improved error handling.

This commit is contained in:
Wang Renxin 2015-10-20 10:03:27 +08:00
parent 0d91bd0acf
commit 483a8a9be5

View File

@ -6809,6 +6809,9 @@ int mb_attempt_close_bracket(struct mb_interpreter_t* s, void** l) {
_handle_error_on_obj(s, SE_RN_CLOSE_BRACKET_EXPECTED, 0, DON(ast), MB_FUNC_ERR, _exit, result);
}
ast = ast->next;
if(_IS_FUNC(ast->data, _core_open_bracket)) {
_handle_error_on_obj(s, SE_RN_SYNTAX, 0, DON(ast), MB_FUNC_ERR, _exit, result);
}
_exit:
*l = ast;