+added an invalid operation usage error when met unexpected expression.

This commit is contained in:
paladin-t 2016-04-26 20:29:31 +08:00
parent 17deb52838
commit 940a4ba74e
4 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,6 @@
Apr. 26 2016
Added an invalid operation usage error when met unexpected expression
Apr. 22 2016 Apr. 22 2016
Added UTF8 token support Added UTF8 token support

View File

@ -228,6 +228,7 @@ static const char* _ERR_DESC[] = {
"Illegal bound", "Illegal bound",
"Too much dimensions", "Too much dimensions",
"Operation failed", "Operation failed",
"Invalid operation usage",
"Dimension count out of bound", "Dimension count out of bound",
"Out of bound", "Out of bound",
"Label does not exist", "Label does not exist",
@ -3657,6 +3658,10 @@ _var:
if(_IS_FUNC(c, _core_close_bracket)) if(_IS_FUNC(c, _core_close_bracket))
hack = true; 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; break;
} }
} }

View File

@ -361,6 +361,7 @@ typedef enum mb_error_e {
SE_RN_ILLEGAL_BOUND, SE_RN_ILLEGAL_BOUND,
SE_RN_TOO_MUCH_DIMENSIONS, SE_RN_TOO_MUCH_DIMENSIONS,
SE_RN_OPERATION_FAILED, SE_RN_OPERATION_FAILED,
SE_RN_INVALID_OPERATION_USAGE,
SE_RN_DIMENSION_COUNT_OUT_OF_BOUND, SE_RN_DIMENSION_COUNT_OUT_OF_BOUND,
SE_RN_ARRAY_OUT_OF_BOUND, SE_RN_ARRAY_OUT_OF_BOUND,
SE_RN_LABEL_NOT_EXISTS, SE_RN_LABEL_NOT_EXISTS,

Binary file not shown.