Examples of matchesQualifiedName()


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

    mayWarnAboutConst(expr);
    Node lhs = expr.getFirstChild();
    Node rhs = expr.getLastChild();
    if (lhs.getBooleanProp(Node.ANALYZED_DURING_GTI)) {
      lhs.removeProp(Node.ANALYZED_DURING_GTI);
      if (rhs.matchesQualifiedName(ABSTRACT_METHOD_NAME)) {
        return new EnvTypePair(inEnv, requiredType);
      }
      JSType declType = getDeclaredTypeOfQname(lhs, inEnv);
      EnvTypePair rhsPair = analyzeExprFwd(rhs, inEnv, declType);
      if (!rhsPair.type.isSubtypeOf(declType)) {
View Full Code Here

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

      compiler.report(JSError.make(callNode, GOOG_CLASS_SUPER_CLASS_NOT_VALID));
      return null;
    }

    if (NodeUtil.isNullOrUndefined(superClass)
        || superClass.matchesQualifiedName("Object")) {
      superClass = null;
    }

    Node description = NodeUtil.getArgumentForCallOrNew(callNode, 1);
    if (description == null
View Full Code Here

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

        return;
      }

      Node objectName = n.getFirstChild();

      if (!objectName.matchesQualifiedName(EXTERN_OBJECT_PROPERTY_STRING)) {
        return;
      }

      if (n.getChildCount() != 3) {
        compiler.report(t.makeError(n, INVALID_NUM_ARGUMENTS_ERROR,
View Full Code Here

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

        return;
      }

      Node objectName = n.getFirstChild();

      if (!objectName.matchesQualifiedName(
          ObjectPropertyStringPreprocess.EXTERN_OBJECT_PROPERTY_STRING)) {
        return;
      }

      Node firstArgument = objectName.getNext();
View Full Code Here

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

          "Message must be initialized using " + MSG_FUNCTION_NAME +
          " function.", node);
    }

    Node fnNameNode = node.getFirstChild();
    if (!fnNameNode.matchesQualifiedName(MSG_FUNCTION_NAME)) {
      throw new MalformedException(
          "Message initialized using unrecognized function. " +
          "Please use " + MSG_FUNCTION_NAME + "() instead.", fnNameNode);
    }
View Full Code Here

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

      String functionName){
    String className = null;
    if (NodeUtil.isExprCall(parent)) {
      Node callee = node.getFirstChild();
      if (callee != null && callee.isGetProp()) {
        if (callee.matchesQualifiedName(functionName)) {
          Node target = callee.getNext();
          if (target != null && target.isString()) {
            className = target.getString();
          }
        }
View Full Code Here

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

  }

  @Override
  public List<String> identifyTypeDeclarationCall(Node n) {
    Node callName = n.getFirstChild();
    if (callName.matchesQualifiedName("goog.addDependency") &&
        n.getChildCount() >= 3) {
      Node typeArray = callName.getNext().getNext();
      if (typeArray.isArrayLit()) {
        List<String> typeNames = Lists.newArrayList();
        for (Node name = typeArray.getFirstChild(); name != null;
View Full Code Here

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

  @Override
  public String getSingletonGetterClassName(Node callNode) {
    Node callArg = callNode.getFirstChild();

    // Use both the original name and the post-CollapseProperties name.
    if (!(callArg.matchesQualifiedName("goog.addSingletonGetter") ||
          callArg.matchesQualifiedName("goog$addSingletonGetter")) ||
        callNode.getChildCount() != 2) {
      return super.getSingletonGetterClassName(callNode);
    }
View Full Code Here

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

  public String getSingletonGetterClassName(Node callNode) {
    Node callArg = callNode.getFirstChild();

    // Use both the original name and the post-CollapseProperties name.
    if (!(callArg.matchesQualifiedName("goog.addSingletonGetter") ||
          callArg.matchesQualifiedName("goog$addSingletonGetter")) ||
        callNode.getChildCount() != 2) {
      return super.getSingletonGetterClassName(callNode);
    }

    return callArg.getNext().getQualifiedName();
View Full Code Here

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

    if (proxyCast != null) {
      return proxyCast;
    }

    Node callName = callNode.getFirstChild();
    if (!callName.matchesQualifiedName("goog.reflect.object") ||
        callNode.getChildCount() != 3) {
      return null;
    }

    Node typeNode = callName.getNext();
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.