removed the DEH symbol ({%).

added new experimental features
 - the signal method to the Error class for simplified error/exception handling
 - the catch method to the BlockContext for simplified error/exception catching instead of the full-fledged on:do
This commit is contained in:
hyunghwan.chung
2017-11-21 15:05:12 +00:00
parent b07cab3874
commit 6177cd6865
5 changed files with 67 additions and 49 deletions

View File

@ -1682,26 +1682,8 @@ 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;

View File

@ -361,7 +361,6 @@ struct moo_iotok_t
MOO_IOTOK_HASHBRACK, /* #[ - byte array literal */
MOO_IOTOK_PERCPAREN, /* %( - array expression */
MOO_IOTOK_PERCBRACE, /* %{ - dictionary expression */
MOO_IOTOK_DEHBRACE, /* {% */
MOO_IOTOK_PERIOD,
MOO_IOTOK_COMMA,
MOO_IOTOK_SEMICOLON