Example #1
0
 @Override
 public boolean visit(JsPrefixOperation x, JsContext ctx) {
   if (x.getOperator() == JsUnaryOperator.DELETE || x.getOperator() == JsUnaryOperator.TYPEOF) {
     nodesInRefContext.add(x.getArg());
   }
   return true;
 }
Example #2
0
 @Override
 public void endVisit(JsPrefixOperation x, JsContext ctx) {
   visitExpression(x, ctx);
   nodesInRefContext.remove(x.getArg());
 }
 private Node transform(JsPrefixOperation x) {
   Node n = new Node(getTokenForOp(x.getOperator()), transform(x.getArg()));
   return applySourceInfo(n, x);
 }