Examples of ArrayOfExpr


Examples of org.allspice.structured.expr.ArrayOfExpr

  public static interface SimpleArrayTest {
    public int[] meth(int arg0) ;
  }
  public void test1() throws Exception {
    SimpleArrayTest obj = makeObject(SimpleArrayTest.class,new DeclareStatement(
        new FIFO<VarDecl>(new VarDecl("int[]","i",new ArrayOfExpr(null,new FIFO<Expr>(ARG0)),false)),
        new FIFO<Statement>(new ReturnStatement(new VarExpr("i",null),null)),
        null
      )) ;
    assertTrue(Arrays.equals(obj.meth(5),new int[]{5})) ;
    assertTrue(Arrays.equals(obj.meth(0),new int[]{0})) ;
View Full Code Here

Examples of org.allspice.structured.expr.ArrayOfExpr

* @return The object
**/
private static final Expr reduce107(PositionRange range,Parser parser,ParserState state) {
      ImmutableCollection<Expr> arrayinit = (ImmutableCollection<Expr>)state.reductions.head.o ;
{
  return new ArrayOfExpr(range,arrayinit) ;
}
}
View Full Code Here

Examples of org.allspice.structured.expr.ArrayOfExpr

**/
private static final Expr reduce146(PositionRange range,Parser parser,ParserState state) {
      String type = (String)state.reductions.tail.head.o ;
      ImmutableCollection<Expr> arrayinit = (ImmutableCollection<Expr>)state.reductions.head.o ;
{
  return new org.allspice.structured.expr.NewArrayExpr(type,new FIFO<Expr>(),new ArrayOfExpr(range,arrayinit),range) ;
}
}
View Full Code Here

Examples of org.allspice.structured.expr.ArrayOfExpr

  public static interface ComplexArrayTest {
    public int[][] meth() ;
  }
  public void test1() throws Exception {
    ComplexArrayTest obj = makeObject(ComplexArrayTest.class,new DeclareStatement(
        new FIFO<VarDecl>(new VarDecl("int[][]","i",new ArrayOfExpr(null,
            new FIFO<Expr>(
              new ArrayOfExpr(null,new FIFO<Expr>(
                  new ConstExpr(Integer.valueOf(6),null),
                  new ConstExpr(Integer.valueOf(9),null)
                  )),
              new ArrayOfExpr(null,new FIFO<Expr>(
                  new ConstExpr(Integer.valueOf(5),null),
                  new ConstExpr(Integer.valueOf(7),null)
                  )))
              ),
            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.