*polished assign operator detection code.

This commit is contained in:
paladin-t 2016-04-19 10:39:33 +08:00
parent bf0df023e6
commit 7d35fe3243

View File

@ -12872,7 +12872,7 @@ static int _core_let(mb_interpreter_t* s, void** l) {
} }
#endif /* MB_ENABLE_COLLECTION_LIB */ #endif /* MB_ENABLE_COLLECTION_LIB */
obj = (_object_t*)ast->data; obj = (_object_t*)ast->data;
if(obj->type != _DT_FUNC || strcmp(obj->data.func->name, "=") != 0) { if(!_IS_FUNC(obj, _core_equal)) { /* Is it an assign operator? */
_handle_error_on_obj(s, SE_RN_ASSIGN_OPERATOR_EXPECTED, s->source_file, DON(ast), MB_FUNC_ERR, _exit, result); _handle_error_on_obj(s, SE_RN_ASSIGN_OPERATOR_EXPECTED, s->source_file, DON(ast), MB_FUNC_ERR, _exit, result);
} }