*fixed a stepping bug in the if
statement.
This commit is contained in:
parent
ae4053c687
commit
35944a5565
1
HISTORY
1
HISTORY
@ -1,5 +1,6 @@
|
||||
Mar. 9 2018
|
||||
Fixed a GC bug with ranged FOR loop
|
||||
Fixed a stepping bug in the IF statement
|
||||
|
||||
Jan. 15 2018
|
||||
Fixed a crash bug with invalid collection index
|
||||
|
@ -293,6 +293,7 @@ MBCONST static const char* const _ERR_DESC[] = {
|
||||
"Operation failed",
|
||||
"Operator expected",
|
||||
"Assign operator expected",
|
||||
"THEN statement expected",
|
||||
"ELSE statement expected",
|
||||
"ENDIF statement expected",
|
||||
"TO statement expected",
|
||||
@ -15654,7 +15655,11 @@ _elseif:
|
||||
skip = true;
|
||||
|
||||
if(!_IS_FUNC(obj, _core_then)) {
|
||||
_handle_error_on_obj(s, SE_RN_INTEGER_EXPECTED, s->source_file, DON(ast), MB_FUNC_ERR, _exit, result);
|
||||
if(ast->prev && _IS_FUNC(ast->prev->data, _core_then)) {
|
||||
ast = ast->prev;
|
||||
} else {
|
||||
_handle_error_on_obj(s, SE_RN_THEN_EXPECTED, s->source_file, DON(ast), MB_FUNC_ERR, _exit, result);
|
||||
}
|
||||
}
|
||||
|
||||
if(ast && ast->next && _IS_EOS(ast->next->data)) {
|
||||
|
@ -434,6 +434,7 @@ typedef enum mb_error_e {
|
||||
SE_RN_OPERATION_FAILED,
|
||||
SE_RN_OPERATOR_EXPECTED,
|
||||
SE_RN_ASSIGN_OPERATOR_EXPECTED,
|
||||
SE_RN_THEN_EXPECTED,
|
||||
SE_RN_ELSE_EXPECTED,
|
||||
SE_RN_ENDIF_EXPECTED,
|
||||
SE_RN_TO_EXPECTED,
|
||||
|
Loading…
x
Reference in New Issue
Block a user