Examples of JsNumberLiteral


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

    push(JsBooleanLiteral.get(x.getValue()));
  }

  @Override
  public final void endVisit(JCharLiteral x, Context ctx) {
    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }
View Full Code Here

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

    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }

  @Override
  public final void endVisit(JDoubleLiteral x, Context ctx) {
    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }
View Full Code Here

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

    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }

  @Override
  public final void endVisit(JFloatLiteral x, Context ctx) {
    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }
View Full Code Here

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

    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }

  @Override
  public final void endVisit(JIntLiteral x, Context ctx) {
    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }
View Full Code Here

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

    JsObjectLiteral objectLit = new JsObjectLiteral(sourceInfo);
    List<JsPropertyInitializer> inits = objectLit.getPropertyInitializers();
    JsExpression label0 = new JsNameRef(sourceInfo, "l");
    JsExpression label1 = new JsNameRef(sourceInfo, "m");
    JsExpression label2 = new JsNameRef(sourceInfo, "h");
    JsExpression value0 = new JsNumberLiteral(sourceInfo, intArray[0]);
    JsExpression value1 = new JsNumberLiteral(sourceInfo, intArray[1]);
    JsExpression value2 = new JsNumberLiteral(sourceInfo, intArray[2]);
    inits.add(new JsPropertyInitializer(sourceInfo, label0, value0));
    inits.add(new JsPropertyInitializer(sourceInfo, label1, value1));
    inits.add(new JsPropertyInitializer(sourceInfo, label2, value2));
    push(objectLit);
  }
View Full Code Here

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

        List<JsExpression> arguments = rewritten.getArguments();
        if (q == null) {
          q = JsNullLiteral.INSTANCE;
        }
        arguments.add(q);
        arguments.add(new JsNumberLiteral(info, dispId));
        arguments.add(new JsNumberLiteral(info, paramCount));

        accept(rewritten);
        return false;
      }
      return super.visit(x, ctx);
View Full Code Here

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

            }

            SourceInfo info = x.getSourceInfo();
            JsInvocation inner = new JsInvocation(info);
            inner.setQualifier(new JsNameRef(info, "__gwt_makeJavaInvoke"));
            inner.getArguments().add(new JsNumberLiteral(info, paramCount));

            JsInvocation outer = new JsInvocation(info);
            outer.setQualifier(inner);
            JsExpression q = ref.getQualifier();
            if (q == null) {
              q = JsNullLiteral.INSTANCE;
            }
            List<JsExpression> arguments = outer.getArguments();
            arguments.add(q);
            arguments.add(new JsNumberLiteral(info, dispId));
            arguments.addAll(x.getArguments());

            accept(outer);
            return false;
          }
View Full Code Here

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

      pair.setLabelExpr(new JsStringLiteral(info, filename));
      JsObjectLiteral lines = new JsObjectLiteral(info);
      List<JsPropertyInitializer> coverage = lines.getPropertyInitializers();
      for (int line : instrumentableLines.get(filename)) {
        coverage.add(new JsPropertyInitializer(info,
            new JsNumberLiteral(info, line), new JsNumberLiteral(info, 0)));
      }
      pair.setValueExpr(lines);
      properties.add(pair);
    }
    return baseline;
View Full Code Here

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

      }
      JsInvocation update = new JsInvocation(info);
      update.setQualifier(jsProgram.getIndexedFunction("CoverageUtil.cover")
          .getName().makeRef(info));
      update.getArguments().add(new JsStringLiteral(info, info.getFileName()));
      update.getArguments().add(new JsNumberLiteral(info, info.getStartLine()));
      ctx.replaceMe(new JsBinaryOperation(info, JsBinaryOperator.COMMA, update, x));
    }
View Full Code Here

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

          && (op2 == JsUnaryOperator.DEC || op2 == JsUnaryOperator.NEG)
          || (op == JsBinaryOperator.ADD || op == JsUnaryOperator.POS)
          && (op2 == JsUnaryOperator.INC || op2 == JsUnaryOperator.POS);
    }
    if (arg instanceof JsNumberLiteral) {
      JsNumberLiteral literal = (JsNumberLiteral) arg;
      return (op == JsBinaryOperator.SUB || op == JsUnaryOperator.NEG)
          && (literal.getValue() < 0);
    }
    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.