Ejemplo n.º 1
0
 Reference(Node nameNode, NodeTraversal t, BasicBlock basicBlock) {
   this(nameNode, basicBlock, t.getScope(), t.getInput().getInputId());
 }
 @Override
 public boolean shouldTraverse(NodeTraversal t, Node n, Node parent) {
   return parent == null || !parent.isScript() || !t.getInput().isExtern();
 }
 @Override
 public final boolean shouldTraverse(NodeTraversal t, Node n, Node parent) {
   // Don't inspect extern files
   return !n.isScript() || !t.getInput().getSourceFile().isExtern();
 }
 // Bleeding functions are weird, because the declaration does
 // not appear inside their scope. So they need their own constructor.
 static Reference newBleedingFunction(NodeTraversal t,
     BasicBlock basicBlock, Node func) {
   return new Reference(func.getFirstChild(),
       basicBlock, t.getScope(), t.getInput().getInputId());
 }