migrated some primitives from Processor to System.

Fixed a bug in manipulating moo->sem_io_wait_count.
Experimenting to add a shortcut exception handling syntax
This commit is contained in:
hyunghwan.chung
2017-11-21 09:15:22 +00:00
parent 85b25d53bc
commit b07cab3874
7 changed files with 151 additions and 49 deletions

View File

@ -1682,8 +1682,26 @@ retry:
break;
case '{': /* extension */
#if 0
SET_TOKEN_TYPE (moo, MOO_IOTOK_LBRACE);
goto single_char_token;
#else
SET_TOKEN_TYPE (moo, MOO_IOTOK_RETURN);
ADD_TOKEN_CHAR(moo, c);
GET_CHAR_TO (moo, c);
if (c == '@')
{
/* {@ */
TOKEN_TYPE(moo) = MOO_IOTOK_DEH_BLOCK; /* default exception handling block */
ADD_TOKEN_CHAR (moo, c);
}
else
{
unget_char (moo, &moo->c->lxc);
}
break;
#endif
case '}': /* extension */
SET_TOKEN_TYPE (moo, MOO_IOTOK_RBRACE);
goto single_char_token;