Examples of matchesQualifiedName()


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

      return null;
    }

    Node callTarget = n.getFirstChild();
    if (callTarget.isQualifiedName()) {
      if (callTarget.matchesQualifiedName("goog.bind")
          || callTarget.matchesQualifiedName("goog$bind")) {
        // goog.bind(fn, self, args...);
        Node fn = callTarget.getNext();
        if (fn == null) {
          return null;
View Full Code Here

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

    }

    Node callTarget = n.getFirstChild();
    if (callTarget.isQualifiedName()) {
      if (callTarget.matchesQualifiedName("goog.bind")
          || callTarget.matchesQualifiedName("goog$bind")) {
        // goog.bind(fn, self, args...);
        Node fn = callTarget.getNext();
        if (fn == null) {
          return null;
        }
View Full Code Here

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

        Node nameNode = n.getFirstChild();
        Node valueNode = n.getLastChild();

        if (nameNode.isQualifiedName() &&
            valueNode.isQualifiedName() &&
            valueNode.matchesQualifiedName(ABSTRACT_METHOD_NAME)) {
          abstractMethodAssignmentNodes.add(new RemovableAssignment(
              n.getFirstChild(), n, t));
        }
      }
    }
View Full Code Here

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

      if (parent == null || !parent.isFunction()
          || n == parent.getFirstChild()) {
        if (n.isExprResult()) {
          Node maybeGetProp = n.getFirstChild().getFirstChild();
          if (maybeGetProp != null
              && (maybeGetProp.matchesQualifiedName("goog.provide")
                  || maybeGetProp.matchesQualifiedName("goog.module"))) {
            found = true;
            return false;
          }
        }
View Full Code Here

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

          || n == parent.getFirstChild()) {
        if (n.isExprResult()) {
          Node maybeGetProp = n.getFirstChild().getFirstChild();
          if (maybeGetProp != null
              && (maybeGetProp.matchesQualifiedName("goog.provide")
                  || maybeGetProp.matchesQualifiedName("goog.module"))) {
            found = true;
            return false;
          }
        }
        return true;
View Full Code Here

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

  }

  private static boolean isGoogModuleCall(Node n) {
    if (NodeUtil.isExprCall(n)) {
      Node target = n.getFirstChild().getFirstChild();
      return (target.matchesQualifiedName("goog.module"));
    }
    return false;
  }

  /**
 
View Full Code Here

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

        break;

      case Token.EXPR_RESULT:
        if (n.getFirstChild().isCall()) {
          Node target = n.getFirstChild().getFirstChild();
          if (target.matchesQualifiedName(
              "goog.module.declareLegacyNamespace")) {
            n.detachFromParent();
          }
        }
        break;
View Full Code Here

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

        }
        break;

      case Token.CALL:
        Node first = n.getFirstChild();
        if (first.matchesQualifiedName("goog.module")) {
          recordAndUpdateModule(t, n);
        } else if (first.matchesQualifiedName("goog.require")) {
          recordRequire(t, n);
        } else if (isLoadModuleCall(n)) {
          rewriteModuleAsScope(n);
View Full Code Here

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

      case Token.CALL:
        Node first = n.getFirstChild();
        if (first.matchesQualifiedName("goog.module")) {
          recordAndUpdateModule(t, n);
        } else if (first.matchesQualifiedName("goog.require")) {
          recordRequire(t, n);
        } else if (isLoadModuleCall(n)) {
          rewriteModuleAsScope(n);
        }
        break;
View Full Code Here

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

      return true;
    }
    if (NodeUtil.isExprCall(n)) {
      Node target = n.getFirstChild().getFirstChild();
      return (
          target.matchesQualifiedName("goog.module")
          || target.matchesQualifiedName("goog.provide")
          || target.matchesQualifiedName("goog.require")
          || target.matchesQualifiedName("goog.setTestOnly"));
    }
    return false;
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.