Examples of IExpression


Examples of org.jacoco.examples.expressions.IExpression

      }
    }
  }

  private IExpression product() throws IOException {
    IExpression e = factor();
    while (true) {
      if (accept('*')) {
        e = new Mul(e, factor());
      } else if (accept('/')) {
        e = new Div(e, factor());
View Full Code Here

Examples of org.jacoco.examples.expressions.IExpression

      }
    }
  }

  private IExpression factor() throws IOException {
    final IExpression e;
    if (accept('(')) {
      e = term();
      expect(')');
    } else {
      expect(TT_NUMBER);
View Full Code Here

Examples of org.lilystudio.javascript.IExpression

          .getNext()) {
        Node valueNode = childNode.getFirstChild();
        IdentifierExpression id = (IdentifierExpression) addExpression(
            childNode, root, scope);
        if (valueNode != null) {
          IExpression value = addExpression(valueNode, root, scope);
          BinaryExpression assignment = new BinaryExpression(node.getLineno(),
              Token.ASSIGN, id, value);
          assignment.setParent(this);
          if (value instanceof NumericLiteral
              && ((NumericLiteral) value).getValue() == 0
View Full Code Here

Examples of org.lilystudio.javascript.IExpression

  }

  public void write(Writer writer, Environment env) throws IOException {
    if (env.getMode() == JSCompressor.FOR_GZIP) {
      for (int i = params.size() - 1; i >= 0; i--) {
        IExpression param = params.get(i);
        if (param instanceof BinaryExpression) {
          BinaryExpression binary = (BinaryExpression) param;
          Identifier id = ((IdentifierExpression) binary.getLeftExpression())
              .getName();
          if (id.getName().startsWith("__gzip_direct__")) {
View Full Code Here

Examples of org.lilystudio.javascript.IExpression

   */
  public ArrayLiteral(Node node, ScriptOrFnNode root, Scope scope) {
    super(node.getLineno());
    for (Node childNode = node.getFirstChild(); childNode != null; childNode = childNode
        .getNext()) {
      IExpression item = addExpression(childNode, root, scope);
      items.add(item);
    }
  }
View Full Code Here

Examples of org.lilystudio.smarty4j.expression.IExpression

        continue;
      }
      case '.': {
        if (type != STRING) {
          c = line.charAt(start + 1);
          IExpression exp;
          if (c == '`') {
            words[wordSize] = null;
            int pos = findExpression(line, start + 2, end, words, wordSize, '`');
            Object o = words[wordSize];
            if (o == null) {
View Full Code Here

Examples of org.lilystudio.smarty4j.expression.IExpression

      for (int index = 3; index + 2 < wordSize; index += 3) {
        Object name = words[index];
        if ((name instanceof String) && Operation.C_SET == words[index + 1]) {
          // 将函数值转换成指定的数据类型
          Object word = words[index + 2];
          IExpression value;
          if (word instanceof IExpression) {
            value = (IExpression) word;
          } else if (Operation.C_SUB == word) {
            word = words[index + 3];
            index++;
View Full Code Here

Examples of org.lilystudio.smarty4j.expression.IExpression

      // 字符串比较exp1与exp2
      // }
      Label isString = new Label();
      Label end = new Label();

      IExpression first;
      IExpression second;
      if (exp1IsNumber) {
        first = exp2;
        second = exp1;
      } else {
        first = exp1;
        second = exp2;
      }

      first.parse(mw, local, variableNames);
      mw.visitInsn(DUP);

      mw.visitMethodInsn(INVOKESTATIC, NAME, "isNumeric",
          "(Ljava/lang/Object;)Z");
      mw.visitJumpInsn(IFEQ, isString);

      mw.visitMethodInsn(INVOKESTATIC, NAME, "o2d", "(Ljava/lang/Object;)D");
      second.parseDouble(mw, local, variableNames);
      checkDouble(mw, exp1IsNumber);
      mw.visitJumpInsn(GOTO, end);

      mw.visitLabel(isString);
      mw.visitMethodInsn(INVOKESTATIC, NAME, "o2s",
          "(Ljava/lang/Object;)Ljava/lang/String;");
      second.parseString(mw, local, variableNames);
      checkString(mw, exp1IsNumber);

      mw.visitLabel(end);
    } else {
      // if (弱类型(exp1) && 弱类型(exp2) instanceof
View Full Code Here

Examples of org.lilystudio.smarty4j.expression.IExpression

    // context.getCaptures().put(name,
    // childWriter);
    // }
    mw.visitVarInsn(ALOAD, WRITER);
    mw.visitVarInsn(ALOAD, CONTEXT);
    IExpression assign = getParameter(1);
    if (assign != null) {
      assign.parse(mw, local, variableNames);
    } else {
      mw.visitMethodInsn(INVOKEVIRTUAL, Context.NAME, "getCaptures",
          "()Ljava/util/Map;");
      getParameter(0).parse(mw, local, variableNames);
    }
View Full Code Here

Examples of org.lilystudio.smarty4j.expression.IExpression

      throws ParseException {
    int index = expressionSize - param;
    if (index < 0) {
      throw new ParseException("运算符参数不足");
    }
    IExpression exp = expressions[index];
    switch (type) {
    case -1:
      if (exp instanceof ConstInteger) {
        ((ConstInteger) exp).inverse();
      } else if (exp instanceof ConstDouble) {
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.