mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2025-01-22 21:35:29 +00:00
Fixed compile errors with g++ 5.1.
This commit is contained in:
parent
0a24f80a38
commit
b035706a0b
24
peglib.h
24
peglib.h
@ -990,13 +990,13 @@ struct Ope::Visitor
|
|||||||
struct AssignIDToDefinition : public Ope::Visitor
|
struct AssignIDToDefinition : public Ope::Visitor
|
||||||
{
|
{
|
||||||
void visit(Sequence& ope) override {
|
void visit(Sequence& ope) override {
|
||||||
for (auto ope: ope.opes_) {
|
for (auto op: ope.opes_) {
|
||||||
ope->accept(*this);
|
op->accept(*this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void visit(PrioritizedChoice& ope) override {
|
void visit(PrioritizedChoice& ope) override {
|
||||||
for (auto ope: ope.opes_) {
|
for (auto op: ope.opes_) {
|
||||||
ope->accept(*this);
|
op->accept(*this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void visit(ZeroOrMore& ope) override { ope.ope_->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) {}
|
IsToken() : has_anchor(false), has_rule(false) {}
|
||||||
|
|
||||||
void visit(Sequence& ope) override {
|
void visit(Sequence& ope) override {
|
||||||
for (auto ope: ope.opes_) {
|
for (auto op: ope.opes_) {
|
||||||
ope->accept(*this);
|
op->accept(*this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void visit(PrioritizedChoice& ope) override {
|
void visit(PrioritizedChoice& ope) override {
|
||||||
for (auto ope: ope.opes_) {
|
for (auto op: ope.opes_) {
|
||||||
ope->accept(*this);
|
op->accept(*this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void visit(ZeroOrMore& ope) override { ope.ope_->accept(*this); }
|
void visit(ZeroOrMore& ope) override { ope.ope_->accept(*this); }
|
||||||
@ -1482,8 +1482,8 @@ private:
|
|||||||
: s_(nullptr), name_(name), done_(false) {}
|
: s_(nullptr), name_(name), done_(false) {}
|
||||||
|
|
||||||
void visit(Sequence& ope) override {
|
void visit(Sequence& ope) override {
|
||||||
for (auto ope: ope.opes_) {
|
for (auto op: ope.opes_) {
|
||||||
ope->accept(*this);
|
op->accept(*this);
|
||||||
if (done_) {
|
if (done_) {
|
||||||
break;
|
break;
|
||||||
} else if (s_) {
|
} else if (s_) {
|
||||||
@ -1493,8 +1493,8 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void visit(PrioritizedChoice& ope) override {
|
void visit(PrioritizedChoice& ope) override {
|
||||||
for (auto ope: ope.opes_) {
|
for (auto op: ope.opes_) {
|
||||||
ope->accept(*this);
|
op->accept(*this);
|
||||||
if (s_) {
|
if (s_) {
|
||||||
done_ = true;
|
done_ = true;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user