Package org.allspice.structured.expr

Examples of org.allspice.structured.expr.CallExpr


      }
    }
    else {
        v = factor ;
    }
    return new CallExpr(v,elist_opt,range) ;

  }
View Full Code Here


  private static void modifyConstructor(EvaluationContext context,
      final ArrayList<Statement> body) throws CompilerException {
    boolean foundInit = firstIsSuperInit(body);
    if (!foundInit) {
      body.add(0,new ExprStatement(new CallExpr(new FieldVarExpr(new VarExpr("super",null),"<init>",null),new FIFO<Expr>(),null),null)) ;
    }
    StubResolver resolver = context.classDef ;
    int pos = 1 ;
    ClassStub stub = resolver.getStub() ;
    for(FieldStub def: stub.fields.values()) {
View Full Code Here

      Statement st = i.next() ;
      if (st instanceof ExprStatement) {
        ExprStatement es = (ExprStatement)st ;
        Expr e = es.e ;
        if (e instanceof CallExpr) {
          CallExpr ce = (CallExpr)e ;
          Expr ve = ce.object ;
          if (ve instanceof FieldVarExpr) {
            FieldVarExpr fvar = (FieldVarExpr)ve ;
            if (fvar.name.equals("<init>")) {
              return true ;
View Full Code Here

  public static interface CallStaticTest {
    public int meth(int arg0) ;
  }
  public void test0() throws Exception {
    CallStaticTest obj = makeObject(CallStaticTest.class,new CallExpr(
        new FieldVarExpr("org.allspice.structuredtobc.test.TestCallStatic","addone",null),
        new FIFO<Expr>(ARG0),null)) ;
    assertEquals(obj.meth(5),6) ;
  }
View Full Code Here

public class TestCallVirtual extends MyTestCase {
  public static interface CallVirtualTest {
    public int meth(CallVirtualTestClass arg0,int arg1) ;
  }
  public void test0() throws Exception {
    CallVirtualTest obj = makeObject(CallVirtualTest.class,new CallExpr(new FieldVarExpr(ARG0,"addone",null),
        new FIFO<Expr>(ARG1),null)) ;
    CallVirtualTestClass o2 = new CallVirtualTestClass() ;
    assertEquals(obj.meth(o2,5),6) ;
  }
View Full Code Here

TOP

Related Classes of org.allspice.structured.expr.CallExpr

Copyright © 2018 www.massapicom. 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.