Package com.google.javascript.rhino

Examples of com.google.javascript.rhino.JSTypeExpression


      Node args = n.getFirstChild().getNext();
      for (Node arg = args.getFirstChild();
           arg != null;
           arg = arg.getNext()) {
        String argName = arg.getString();
        JSTypeExpression typeExpr = fnInfo == null ?
            null : fnInfo.getParameterType(argName);

        if (convention.isOptionalParameter(arg) ||
            typeExpr != null && typeExpr.isOptionalArg()) {
          arg.putBooleanProp(Node.IS_OPTIONAL_PARAM, true);
        }
        if (convention.isVarArgsParameter(arg) ||
            typeExpr != null && typeExpr.isVarArgs()) {
          arg.putBooleanProp(Node.IS_VAR_ARGS_PARAM, true);
        }
      }
    }
View Full Code Here


  boolean parse() {
    int lineno;
    int charno;

    // JSTypes are represented as Rhino AST nodes, and then resolved later.
    JSTypeExpression type;

    state = State.SEARCHING_ANNOTATION;
    skipEOLs();

    JsDocToken token = next();
View Full Code Here

   * Constructs a new {@code JSTypeExpression}.
   * @param n A node. May be null.
   */
  private JSTypeExpression createJSTypeExpression(Node n) {
    return n == null ? null :
        new JSTypeExpression(n, sourceName);
  }
View Full Code Here

  /**
   * Asserts that a Node representing a type expression resolves to the
   * correct {@code JSType}.
   */
  protected void assertTypeEquals(JSType expected, Node actual) {
    assertTypeEquals(expected, new JSTypeExpression(actual, ""));
  }
View Full Code Here

TOP

Related Classes of com.google.javascript.rhino.JSTypeExpression

Copyright © 2018 www.massapicom. 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.