Examples of detachFromParent()


Examples of com.google.javascript.rhino.Node.detachFromParent()

          }

          Node elseExpr = nextNode.getFirstChild();

          cond.detachFromParent();
          elseExpr.detachFromParent();

          Node hookNode = new Node(Token.HOOK, cond, thenExpr, elseExpr)
                              .copyInformationFrom(child);
          Node returnNode = new Node(Token.RETURN, hookNode);
          n.replaceChild(child, returnNode);
View Full Code Here

Examples of com.google.javascript.rhino.Node.detachFromParent()

    if (isReturnExpressBlock(thenBranch) && isReturnExpressBlock(elseBranch)) {
      Node thenExpr = getBlockReturnExpression(thenBranch);
      Node elseExpr = getBlockReturnExpression(elseBranch);
      n.removeChild(cond);
      thenExpr.detachFromParent();
      elseExpr.detachFromParent();

      // note - we ignore any cases with "return;", technically this
      // can be converted to "return undefined;" or some variant, but
      // that does not help code size.
      Node hookNode = new Node(Token.HOOK, cond, thenExpr, elseExpr)
View Full Code Here

Examples of com.google.javascript.rhino.Node.detachFromParent()

      if (lastTrue == null || lastFalse == null
          || !areNodesEqualForInlining(lastTrue, lastFalse)) {
        break;
      }
      lastTrue.detachFromParent();
      lastFalse.detachFromParent();
      parent.addChildAfter(lastTrue, n);
      reportCodeChange();
    }
  }
View Full Code Here

Examples of com.google.javascript.rhino.Node.detachFromParent()

                myObj.func1 = function()
             */
            Node expr = findExprOrVar(n);
            if (expr != null && expr.getType() == Token.EXPR_RESULT && expr.getParent() != null) {
                LOGGER.log(Level.FINE, "expr: " + expr);
                expr.detachFromParent();
            }
        } else {
            /*
             This is a standard type of function like this:
                function myFunc()
View Full Code Here

Examples of dtool.ast.expressions.ExpMixinString.detachFromParent()

      // Check if ";" was consumed
      if(declResult.ruleBroken) {
        // If not, then this could have been parsed as an expression, retry with expression rule.
       
        ExpMixinString expMixinString = declarationMixinString.exp;
        expMixinString.detachFromParent();
       
        // TODO: perhaps we could add a precise check for whether expMixinString
        // was consumed sucessfully or had rule broken
       
        ParseHelper parse = new ParseHelper(expMixinString.getStartPos());
View Full Code Here

Examples of dtool.ast.references.RefTypeof.detachFromParent()

        iterable = parseForeachIterableExpression();
        if(iterable instanceof ExpReference) {
          ExpReference expReference = (ExpReference) iterable;
          if(expReference.ref instanceof RefTypeof) {
            RefTypeof refTypeof = (RefTypeof) expReference.ref;
            refTypeof.detachFromParent();
            // This will remove the typeof error, since foreach allows tuples as the iterable part,
            // and typeof can be used to create a type tuple.
            iterable = createExpReference(refTypeof, false);
          }
        }
View Full Code Here

Examples of org.libreplan.business.orders.entities.OrderElement.detachFromParent()

                orderElement = findOrderElement(order, orderElement.getId());

                OrderLineGroup parent = orderElement.getParent();
                parent.remove(orderElement);
                orderElement.detachFromParent();

                if (!parent.isOrder() && parent.getChildren().isEmpty()) {
                    OrderElement newElement = parent.toLeaf();
                    if (!order.isCodeAutogenerated()) {
                        newElement.setCode(UUID.randomUUID().toString());
View Full Code Here

Examples of org.libreplan.business.orders.entities.OrderLineGroup.detachFromParent()

                    OrderElement newElement = parent.toLeaf();
                    if (!order.isCodeAutogenerated()) {
                        newElement.setCode(UUID.randomUUID().toString());
                    }
                    parent.getParent().replace(parent, newElement);
                    parent.detachFromParent();
                }

                orderModel.save();
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.