Package com.google.gxp.compiler.base

Examples of com.google.gxp.compiler.base.StringConstant.evaluate()


  }

  public void testStr() throws Exception {
    String value = "Hello, world!";
    StringConstant result = str(value);
    assertEquals(value, result.evaluate());
  }

  public void testEscape() throws Exception {
    Expression subexpression = expr("\"foo < bar\"");
    Schema schema = htmlSchema();
View Full Code Here


      {
        SourcePosition sbPos = null;
        for (Expression value : values) {
          if (value instanceof StringConstant) {
            StringConstant stringConstant = (StringConstant) value;
            sb.append(stringConstant.evaluate());
            if (sbPos == null) {
              sbPos = stringConstant.getSourcePosition();
            }
          } else {
            textSegments.add(sb.toString());
View Full Code Here

      childNode = ((CollapseExpression) childNode).getSubexpression();
    }
    assertTrue(childNode + " is not a StringConstant.",
               childNode instanceof StringConstant);
    StringConstant stringConstant = (StringConstant) childNode;
    assertEquals("", stringConstant.evaluate());
  }

  private ReparentedTree reparent(IfExpandedTree parseTree) {
    ReparentedTree result = new Reparenter(BuiltinSchemaFactory.INSTANCE,
                                           TEMPLATE_NAME.toString())
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.