Commit a742bc80 authored by Kevin Modzelewski's avatar Kevin Modzelewski
parent 28f055ef
......@@ -164,7 +164,7 @@ private:
}
}
raiseExcHelper(SyntaxError, "'continue' outside loop");
raiseExcHelper(SyntaxError, "'continue' not properly in loop");
}
void doBreak() {
......@@ -1884,6 +1884,18 @@ public:
}
bool visit_tryexcept(AST_TryExcept* node) override {
// The pypa parser will generate a tryexcept node inside a try-finally block with
// no except clauses
if (node->handlers.size() == 0) {
assert(ENABLE_PYPA_PARSER);
assert(node->orelse.size() == 0);
for (AST_stmt* subnode : node->body) {
subnode->accept(this);
}
return true;
}
assert(node->handlers.size() > 0);
CFGBlock* exc_handler_block = cfg->addDeferredBlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment