Fixed compile errors with g++ 5.1.

pull/3/head
yhirose 9 years ago
parent 0a24f80a38
commit b035706a0b
  1. 24
      peglib.h

@ -990,13 +990,13 @@ struct Ope::Visitor
struct AssignIDToDefinition : public Ope::Visitor
{
void visit(Sequence& ope) override {
for (auto ope: ope.opes_) {
ope->accept(*this);
for (auto op: ope.opes_) {
op->accept(*this);
}
}
void visit(PrioritizedChoice& ope) override {
for (auto ope: ope.opes_) {
ope->accept(*this);
for (auto op: ope.opes_) {
op->accept(*this);
}
}
void visit(ZeroOrMore& ope) override { ope.ope_->accept(*this); }
@ -1019,13 +1019,13 @@ struct IsToken : public Ope::Visitor
IsToken() : has_anchor(false), has_rule(false) {}
void visit(Sequence& ope) override {
for (auto ope: ope.opes_) {
ope->accept(*this);
for (auto op: ope.opes_) {
op->accept(*this);
}
}
void visit(PrioritizedChoice& ope) override {
for (auto ope: ope.opes_) {
ope->accept(*this);
for (auto op: ope.opes_) {
op->accept(*this);
}
}
void visit(ZeroOrMore& ope) override { ope.ope_->accept(*this); }
@ -1482,8 +1482,8 @@ private:
: s_(nullptr), name_(name), done_(false) {}
void visit(Sequence& ope) override {
for (auto ope: ope.opes_) {
ope->accept(*this);
for (auto op: ope.opes_) {
op->accept(*this);
if (done_) {
break;
} else if (s_) {
@ -1493,8 +1493,8 @@ private:
}
}
void visit(PrioritizedChoice& ope) override {
for (auto ope: ope.opes_) {
ope->accept(*this);
for (auto op: ope.opes_) {
op->accept(*this);
if (s_) {
done_ = true;
break;

Loading…
Cancel
Save