[flang] Walk source member of Call and Designator

A `source` data member was added to `Call` and `Designator` so
the parse tree visitor needs to visit them.

Original-commit: flang-compiler/f18@0a620f1a5e
Reviewed-on: https://github.com/flang-compiler/f18/pull/433
Tree-same-pre-rewrite: false
This commit is contained in:
Tim Keith 2019-04-26 15:01:09 -07:00
parent e51108c138
commit 876bf77a3c
1 changed files with 28 additions and 0 deletions

View File

@ -494,6 +494,34 @@ template<typename M> void Walk(Expr &x, M &mutator) {
mutator.Post(x);
}
}
template<typename V> void Walk(const Designator &x, V &visitor) {
if (visitor.Pre(x)) {
Walk(x.source, visitor);
Walk(x.u, visitor);
visitor.Post(x);
}
}
template<typename M> void Walk(Designator &x, M &mutator) {
if (mutator.Pre(x)) {
Walk(x.source, mutator);
Walk(x.u, mutator);
mutator.Post(x);
}
}
template<typename V> void Walk(const Call &x, V &visitor) {
if (visitor.Pre(x)) {
Walk(x.source, visitor);
Walk(x.t, visitor);
visitor.Post(x);
}
}
template<typename M> void Walk(Call &x, M &mutator) {
if (mutator.Pre(x)) {
Walk(x.source, mutator);
Walk(x.t, mutator);
mutator.Post(x);
}
}
template<typename V> void Walk(const PartRef &x, V &visitor) {
if (visitor.Pre(x)) {
Walk(x.name, visitor);