*fixed a parsing bug with unary negative operator.

This commit is contained in:
Wang Renxin 2018-01-03 20:57:15 +08:00
parent a08c6c845c
commit 4edc80d026
2 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,6 @@
Jan. 3 2017
Fixed a parsing bug with unary negative operator
Nov. 28 2017
Fixed a referencing bug with the IF statement

View File

@ -5662,7 +5662,7 @@ _routine:
/* _func_t */
if(!context->last_symbol ||
(context->last_symbol && ((context->last_symbol->type == _DT_FUNC && context->last_symbol->data.func->pointer != _core_close_bracket) ||
context->last_symbol->type == _DT_SEP))) {
context->last_symbol->type == _DT_SEP || context->last_symbol->type == _DT_EOS))) {
if(strcmp("-", sym) == 0) {
ptr = (intptr_t)_core_neg;
memcpy(*value, &ptr, sizeof(intptr_t));