diff --git a/HISTORY b/HISTORY index 8ce865b..76ea071 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +May. 12 2017 +Fixed a wrong multi-line enabled bug when met unexpected token + May. 10 2017 Added an mb_make_usertype_bytes macro Fixed a crash bug when there's no receiver of a returned string value, thanks to Beyond07 for pointing it out diff --git a/core/my_basic.c b/core/my_basic.c index 92608d4..a73d348 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -11579,6 +11579,9 @@ int mb_attempt_func_begin(struct mb_interpreter_t* s, void** l) { ast = (_ls_node_t*)*l; obj = (_object_t*)ast->data; if(!(obj->type == _DT_FUNC)) { +#ifdef _MULTILINE_STATEMENT + _ls_popback(s->multiline_enabled); +#endif /* _MULTILINE_STATEMENT */ _handle_error_on_obj(s, SE_RN_INCOMPLETE_STRUCTURE, s->source_file, DON(ast), MB_FUNC_ERR, _exit, result); } ast = ast->next; @@ -11631,6 +11634,9 @@ int mb_attempt_open_bracket(struct mb_interpreter_t* s, void** l) { obj = (_object_t*)ast->data; #endif /* _MULTILINE_STATEMENT */ if(!_IS_FUNC(obj, _core_open_bracket)) { +#ifdef _MULTILINE_STATEMENT + _ls_popback(s->multiline_enabled); +#endif /* _MULTILINE_STATEMENT */ _handle_error_on_obj(s, SE_RN_OPEN_BRACKET_EXPECTED, s->source_file, DON(ast), MB_FUNC_ERR, _exit, result); } ast = ast->next;