Minor speed improvements

This commit is contained in:
Jason Turner
2015-03-23 20:07:07 -06:00
parent 0b28603cdc
commit 5b9878b070
2 changed files with 20 additions and 28 deletions

View File

@@ -1687,6 +1687,10 @@ namespace chaiscript
throw exception::eval_error("Incomplete class block", File_Position(m_line, m_col), *m_filename);
}
if (m_match_stack.size() == prev_stack_top) {
m_match_stack.push_back(std::make_shared<eval::Noop_AST_Node>());
}
build_match(std::make_shared<eval::Block_AST_Node>(), prev_stack_top);
}
@@ -1707,6 +1711,10 @@ namespace chaiscript
throw exception::eval_error("Incomplete block", File_Position(m_line, m_col), *m_filename);
}
if (m_match_stack.size() == prev_stack_top) {
m_match_stack.push_back(std::make_shared<eval::Noop_AST_Node>());
}
build_match(std::make_shared<eval::Block_AST_Node>(), prev_stack_top);
}