Examples of JsNode


Examples of com.google.gwt.dev.js.ast.JsNode

   * Produces a {@link JsNameRef}.
   */
  private JsNameRef mapAsPropertyNameRef(Node nameRefNode)
      throws JsParserException {
    // Javac 1.6.0_01 doesn't like the cast below if this is parameterized
    @SuppressWarnings("unchecked")
    JsNode unknown = map(nameRefNode);
    // This is weird, but for "a.b", the rhino AST calls "b" a string literal.
    // However, since we know it's for a PROPGET, we can unstringliteralize it.
    //
    if (unknown instanceof JsStringLiteral) {
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNode

    }
  }

  private JsExpression mapExpression(Node exprNode) throws JsParserException {
    // Javac 1.6.0_01 doesn't like the cast below if this is parameterized
    @SuppressWarnings("unchecked")
    JsNode unknown = map(exprNode);
    if (unknown instanceof JsExpression) {
      return (JsExpression) unknown;
    } else {
      throw createParserException("Expecting an expression", exprNode);
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNode

      //
      JsFor toFor = new JsFor(makeSourceInfo(forNode));

      // The first item is either an expression or a JsVars.
      // Javac 1.6.0_01 doesn't like the cast below if this is parameterized
      @SuppressWarnings("unchecked")
      JsNode initThingy = map(fromInit);
      if (initThingy != null) {
        if (initThingy instanceof JsVars) {
          toFor.setInitVars((JsVars) initThingy);
        } else {
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNode

  }

  private JsExpression mapOptionalExpression(Node exprNode)
      throws JsParserException {
    // Javac 1.6.0_01 doesn't like the cast below if this is parameterized
    @SuppressWarnings("unchecked")
    JsNode unknown = map(exprNode);
    if (unknown != null) {
      if (unknown instanceof JsExpression) {
        return (JsExpression) unknown;
      } else {
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNode

    }
  }

  private JsStatement mapStatement(Node nodeStmt) throws JsParserException {
    // Javac 1.6.0_01 doesn't like the cast below if this is parameterized
    @SuppressWarnings("unchecked")
    JsNode unknown = map(nodeStmt);
    if (unknown != null) {
      if (unknown instanceof JsStatement) {
        return (JsStatement) unknown;
      } else if (unknown instanceof JsExpression) {
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNode

  @SuppressWarnings("unchecked")
  private static JsFunction isFunction(JsExpression e) {
    if (e instanceof JsNameRef) {
      JsNameRef ref = (JsNameRef) e;

      JsNode staticRef = ref.getName().getStaticRef();
      if (staticRef instanceof JsFunction) {
        return (JsFunction) staticRef;
      }
    }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNode

      }

      // setup fields
      JsVars vars = new JsVars(x.getSourceInfo());
      for (int i = 0; i < jsFields.size(); ++i) {
        JsNode node = jsFields.get(i);
        if (node instanceof JsVar) {
          vars.add((JsVar) node);
        } else {
          assert (node instanceof JsStatement);
          JsStatement stmt = (JsStatement) node;
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNode

      }

      // setup fields
      JsVars vars = new JsVars();
      for (int i = 0; i < jsFields.size(); ++i) {
        JsNode node = (JsNode) jsFields.get(i);
        if (node instanceof JsVar) {
          vars.add((JsVar) node);
        } else {
          assert (node instanceof JsStatement);
          JsStatement stmt = (JsStatement) jsFields.get(i);
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNode

      }

      // setup fields
      JsVars vars = new JsVars();
      for (int i = 0; i < jsFields.size(); ++i) {
        JsNode node = (JsNode) jsFields.get(i);
        assert (node instanceof JsVar);
        vars.add((JsVar) node);
      }
      if (!vars.isEmpty()) {
        globalStmts.add(vars);
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNode

        array[--count] = pop();
      }

      List/* <T> */list = new ArrayList/* <T> */();
      for (int i = 0; i < array.length; i++) {
        JsNode item = array[i];
        if (item != null) {
          list.add(/* (T) */item);
        }
      }
      return list;
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.