Allow typing of exception handlers

This commit is contained in:
Jason Turner
2015-01-13 14:05:41 -07:00
parent 3f23e57a3d
commit ef69e4a2f1
2 changed files with 96 additions and 112 deletions

View File

@@ -1337,7 +1337,7 @@ namespace chaiscript
if (Keyword("catch", false)) {
const auto catch_stack_top = m_match_stack.size();
if (Char('(')) {
if (!(Id(true) && Char(')'))) {
if (!(Arg() && Char(')'))) {
throw exception::eval_error("Incomplete 'catch' expression", File_Position(m_line, m_col), *m_filename);
}
if (Char(':')) {