Skip to content

Commit

Permalink
oops. use latest API
Browse files Browse the repository at this point in the history
  • Loading branch information
tokuhirom committed Dec 23, 2013
1 parent 31c1789 commit e35a317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tora/compiler.cc
Expand Up @@ -611,7 +611,7 @@ void tora::Compiler::compile(const SharedPtr<Node> &node) {
// 'sub foo () { }' form.
params.reset(new std::vector<std::string>());
for (size_t i=0; i<funcdef_node->params()->size(); i++) {
assert(funcdef_node->params()->at(i)->list->size() == 2);
assert(funcdef_node->params()->at(i)->children().size() == 2);
const SharedPtr<Node>& param_name = funcdef_node->params()->at(i)->at(0);

params->push_back(param_name->upcast<StrNode>()->str_value);
Expand Down Expand Up @@ -643,7 +643,7 @@ void tora::Compiler::compile(const SharedPtr<Node> &node) {
OP * skip_defvars = new OP(OP_JUMP);
funccomp.push_op(skip_defvars);
for (size_t i=0; i<funcdef_node->params()->size(); i++) {
assert(funcdef_node->params()->at(i)->list->size() == 2);
assert(funcdef_node->params()->at(i)->children().size() == 2);
const SharedPtr<Node>& default_node = funcdef_node->params()->at(i)->at(1);
if (default_node.get()) {
// printf("FOUND DEFAULT VALUE: %ld\n", (long int) i);
Expand Down

0 comments on commit e35a317

Please sign in to comment.