@@ -216,28 +216,27 @@ class ASTWalker {
216216 return {Continue (), std::move (node)};
217217 }
218218
219- // / Continue the current walk, replacing the current node with \p node.
220- // / However, skip visiting the children of \p node, and instead resume the
221- // / walk of the parent node.
219+ // / Skips visiting both the node's children and its post-visitation.
222220 template <typename T>
223- static _Detail::SkipChildrenIfWalkResult<T> SkipChildren (T node) {
224- return SkipChildrenIf (true , std::move (node));
221+ static _Detail::SkipChildrenIfWalkResult<T>
222+ SkipNode (T node) {
223+ return SkipNodeIf (true , std::move (node));
225224 }
226225
227- // / If \p cond is true, this is equivalent to \c Action::SkipChildren (node).
226+ // / If \p cond is true, this is equivalent to \c Action::SkipNode (node).
228227 // / Otherwise, it is equivalent to \c Action::Continue(node).
229228 template <typename T>
230229 static _Detail::SkipChildrenIfWalkResult<T>
231- SkipChildrenIf (bool cond, T node) {
232- return {SkipChildrenIf (cond), std::move (node)};
230+ SkipNodeIf (bool cond, T node) {
231+ return {SkipNodeIf (cond), std::move (node)};
233232 }
234233
235234 // / If \p cond is true, this is equivalent to \c Action::Continue(node).
236- // / Otherwise, it is equivalent to \c Action::SkipChildren (node).
235+ // / Otherwise, it is equivalent to \c Action::SkipNode (node).
237236 template <typename T>
238237 static _Detail::SkipChildrenIfWalkResult<T>
239- VisitChildrenIf (bool cond, T node) {
240- return SkipChildrenIf (!cond, std::move (node));
238+ VisitNodeIf (bool cond, T node) {
239+ return SkipNodeIf (!cond, std::move (node));
241240 }
242241
243242 // / If \p cond is true, this is equivalent to \c Action::Stop().
@@ -250,22 +249,23 @@ class ASTWalker {
250249 // / Continue the current walk.
251250 static _Detail::ContinueWalkAction Continue () { return {}; }
252251
253- // / Continue the current walk, but do not visit the children of the current
254- // / node. Instead, resume at the parent's post-walk.
255- static _Detail::SkipChildrenIfWalkAction SkipChildren () {
256- return SkipChildrenIf (true );
252+ // / Skips visiting both the node's children and its post-visitation.
253+ static _Detail::SkipChildrenIfWalkAction SkipNode () {
254+ return SkipNodeIf (true );
257255 }
258256
259- // / If \p cond is true, this is equivalent to \c Action::SkipChildren ().
257+ // / If \p cond is true, this is equivalent to \c Action::SkipNode ().
260258 // / Otherwise, it is equivalent to \c Action::Continue().
261- static _Detail::SkipChildrenIfWalkAction SkipChildrenIf (bool cond) {
259+ static _Detail::SkipChildrenIfWalkAction
260+ SkipNodeIf (bool cond) {
262261 return {cond};
263262 }
264263
265264 // / If \p cond is true, this is equivalent to \c Action::Continue().
266- // / Otherwise, it is equivalent to \c Action::SkipChildren().
267- static _Detail::SkipChildrenIfWalkAction VisitChildrenIf (bool cond) {
268- return SkipChildrenIf (!cond);
265+ // / Otherwise, it is equivalent to \c Action::SkipNode().
266+ static _Detail::SkipChildrenIfWalkAction
267+ VisitNodeIf (bool cond) {
268+ return SkipNodeIf (!cond);
269269 }
270270
271271 // / Terminate the walk, returning without visiting any other nodes.
@@ -281,14 +281,14 @@ class ASTWalker {
281281 // / A pre-visitation action for AST nodes that do not support being replaced
282282 // / while walking.
283283 struct PreWalkAction {
284- enum Kind { Stop, SkipChildren , Continue };
284+ enum Kind { Stop, SkipNode , Continue };
285285 Kind Action;
286286
287287 PreWalkAction (_Detail::ContinueWalkAction) : Action(Continue) {}
288288 PreWalkAction (_Detail::StopWalkAction) : Action(Stop) {}
289289
290290 PreWalkAction (_Detail::SkipChildrenIfWalkAction action)
291- : Action(action.Cond ? SkipChildren : Continue) {}
291+ : Action(action.Cond ? SkipNode : Continue) {}
292292
293293 PreWalkAction (_Detail::StopIfWalkAction action)
294294 : Action(action.Cond ? Stop : Continue) {}
0 commit comments