Examples of IntegerLiteral


Examples of com.google.caja.parser.js.IntegerLiteral

            + "  throw new TypeError(''"
            + "      + 'Method called with incorrect arity:'"
            + "      + ' expected at least ' + @num + ' arguments'"
            + "      + ' but was ' + args.length);"
            + "}",
            "num", new IntegerLiteral(
                FilePosition.UNKNOWN, m.getParameters().length - 1))
        : QuasiBuilder.substV(""
            + "if (args.length !== @num) {"
            + "  throw new TypeError(''"
            + "      + 'Method called with incorrect arity:'"
            + "      + ' expected ' + @num + ' arguments'"
            + "      + ' but was ' + args.length);"
            + "}",
            "num", new IntegerLiteral(
                FilePosition.UNKNOWN, m.getParameters().length));
  }
View Full Code Here

Examples of com.google.caja.parser.js.IntegerLiteral

    for (U e : entries) {
      // Since enum values are public, we don't want Closure compiler
      // to rewrite them, so we need quoted keys.
      String quoted = StringLiteral.toQuotedValue(keyMaker.apply(e));
      keys.add(new StringLiteral(unk, quoted));
      values.add(new IntegerLiteral(unk, valueMaker.apply(e)));
    }
    return new ExpressionStmt(unk,
        (Expression) QuasiBuilder.substV(
            "html4.@i = { @k*: @v* };",
            "i", new Reference(new Identifier(unk, key)),
View Full Code Here

Examples of com.google.caja.parser.js.IntegerLiteral

        if (ElKey.HTML_WILDCARD.equals(key.el)
            || schema.isElementAllowed(key.el)
            // Whitelisted to allow dynamic script loading via proxy
            || SCRIPT_SRC.equals(key)) {
          keys.add(StringLiteral.valueOf(unk, key.toString()));
          values.add(new IntegerLiteral(unk, A_TYPE_MAP.get(e.getValue())));
        }
      }
      definitions.appendChild(new ExpressionStmt(unk, (Expression)
          QuasiBuilder.substV(
              "html4.ATTRIBS = { @k*: @v* };",
              "k", new ParseTreeNodeContainer(keys),
              "v", new ParseTreeNodeContainer(values))));
    }

    definitions.appendChild(mapFromEnum(
        EnumSet.allOf(EFlag.class),
        "eflags",
        new Function<EFlag, String>() {
          public String apply(EFlag f) {
            return f.name();
          }
        },
        new Function<EFlag, Integer>() {
          public Integer apply(EFlag f) {
            return f.bitMask;
          }
        })
    );

    {
      List<StringLiteral> keys = new ArrayList<StringLiteral>();
      List<IntegerLiteral> values = new ArrayList<IntegerLiteral>();
      for (Map.Entry<ElKey, EnumSet<EFlag>> e : eflags.entrySet()) {
        ElKey key = e.getKey();
        int value = 0;
        for (EFlag f : e.getValue()) { value |= f.bitMask; }
        keys.add(StringLiteral.valueOf(unk, key.toString()));
        values.add(new IntegerLiteral(unk, value));
      }
      definitions.appendChild(new ExpressionStmt(unk, (Expression)
          QuasiBuilder.substV(
              "html4.ELEMENTS = { @k*: @v* };",
              "k", new ParseTreeNodeContainer(keys),
View Full Code Here

Examples of expression.integer.IntegerLiteral

  // <!ELEMENT IDSExprDecimalIntegerLiteral EMPTY>
  // <!ATTLIST IDSExprDecimalIntegerLiteral value CDATA #IMPLIED>
  static private Expression intLiteral(Node n) {
    String val = ((Element) n).getAttribute("value");
    return new IntegerLiteral(val);
  }
View Full Code Here

Examples of org.apache.expreval.expr.literal.IntegerLiteral

                if (obj instanceof Short)
                    return new ShortLiteral((Short)obj);

                if (obj instanceof Integer)
                    return new IntegerLiteral((Integer)obj);

                if (obj instanceof Long)
                    return new LongLiteral((Long)obj);

                if (obj instanceof Float)
View Full Code Here

Examples of org.apache.taglibs.standard.lang.jstl.IntegerLiteral

  }

  final public IntegerLiteral IntegerLiteral() throws ParseException {
  Token t;
    t = jj_consume_token(INTEGER_LITERAL);
    {if (true) return new IntegerLiteral (t.image);}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

Examples of org.apache.taglibs.standard.lang.jstl.IntegerLiteral

  }

  final public IntegerLiteral IntegerLiteral() throws ParseException {
  Token t;
    t = jj_consume_token(INTEGER_LITERAL);
    {if (true) return new IntegerLiteral (t.image);}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

Examples of org.apache.taglibs.standard.lang.jstl.IntegerLiteral

  }

  final public IntegerLiteral IntegerLiteral() throws ParseException {
  Token t;
    t = jj_consume_token(INTEGER_LITERAL);
    {if (true) return new IntegerLiteral (t.image);}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

Examples of org.apache.taglibs.standard.lang.jstl.IntegerLiteral

  }

  final public IntegerLiteral IntegerLiteral() throws ParseException {
  Token t;
    t = jj_consume_token(INTEGER_LITERAL);
    {if (true) return new IntegerLiteral (t.image);}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

Examples of org.apache.taglibs.standard.lang.jstl.IntegerLiteral

  }

  final public IntegerLiteral IntegerLiteral() throws ParseException {
  Token t;
    t = jj_consume_token(INTEGER_LITERAL);
    {if (true) return new IntegerLiteral (t.image);}
    throw new Error("Missing return statement in function");
  }
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.