protected void trackContext(SimpleNode node) throws Exception { AbstractNodeAdapter<? extends SimpleNode> context = before(node); pushParent(context); traverse(node); parents.pop(); after(); }
@Override public void traverse(SimpleNode node) throws Exception { if (nodeHelper.isFunctionDef(node)) { traverse((FunctionDef) node); } else { node.traverse(this); } }
@Override public Object visitFunctionDef(FunctionDef node) throws Exception { AbstractNodeAdapter<? extends SimpleNode> context = before(node); pushParent(context); traverse(node); parents.pop(); after(); return null; }
@Override public void traverse(SimpleNode node) throws Exception { if (nodeHelper.isClassDef(node)) { return; } if (nodeHelper.isFunctionDef(node)) { return; } super.traverse(node); }
protected void updateASTContext(SimpleNode node) throws Exception { before(node); traverse(node); after(); }