diff --git a/HISTORY b/HISTORY index 29bf732..61f86e5 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +Apr. 26 2016 +Added an invalid operation usage error when met unexpected expression + Apr. 22 2016 Added UTF8 token support diff --git a/core/my_basic.c b/core/my_basic.c index abff666..00ae53a 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -228,6 +228,7 @@ static const char* _ERR_DESC[] = { "Illegal bound", "Too much dimensions", "Operation failed", + "Invalid operation usage", "Dimension count out of bound", "Out of bound", "Label does not exist", @@ -3657,6 +3658,10 @@ _var: if(_IS_FUNC(c, _core_close_bracket)) hack = true; + break; + case ' ': + _handle_error_on_obj(s, SE_RN_INVALID_OPERATION_USAGE, s->source_file, errn ? DON(errn) : DON(ast), MB_FUNC_ERR, _error, result); + break; } } diff --git a/core/my_basic.h b/core/my_basic.h index f1cdf99..4965db8 100755 --- a/core/my_basic.h +++ b/core/my_basic.h @@ -361,6 +361,7 @@ typedef enum mb_error_e { SE_RN_ILLEGAL_BOUND, SE_RN_TOO_MUCH_DIMENSIONS, SE_RN_OPERATION_FAILED, + SE_RN_INVALID_OPERATION_USAGE, SE_RN_DIMENSION_COUNT_OUT_OF_BOUND, SE_RN_ARRAY_OUT_OF_BOUND, SE_RN_LABEL_NOT_EXISTS, diff --git a/output/my_basic.exe b/output/my_basic.exe index 26f84d8..30f65e5 100755 Binary files a/output/my_basic.exe and b/output/my_basic.exe differ