Package net.sf.laja.parser.template

Examples of net.sf.laja.parser.template.PeekStatement


    if (cntClasses <= 1 && !((om2.getRefname().equals(om2.getCargName()) &&
      om2.getRefname().equals(om2.getArgName())))) {
      for (Outputmethod om : list) {
        if (om.isClass()) {
          if (om.isDefined()) {
                        PeekStatement peekStatement = new PeekStatement(om.getClassName(), om.getMethodName(), OutDatatype.CLASS, om.getOmargList());
                        peekStatement.setArgClass(om.getArgClass());
                        out.addStatement(peekStatement);
          } else if (refdata != null) {
                        PopStatement popStatement = new PopStatement(refList.getRef(refdata.getOrigVar()).getClassName());
                        out.addStatement(popStatement);
          }
        } else {
          if (om.isClassRef()) {
                        PopStatement popStatement = new PopStatement(om.getClassRef());
                        out.addStatement(popStatement);
          }
          if (om.isStr()) {
                        out.addStatement(new PeekStatement(om.getClassName(), om.getMethodName(), OutDatatype.STRING, om.getOmargList()));
          } else if (om.isIndex()) {
                        out.addStatement(new PeekStatement(om.getClassName(), om.getMethodName(), OutDatatype.INDEX, om.getOmargList()));
          } else if (om.isVoid()) {
                        out.addStatement(new PeekStatement(om.getClassName(), om.getMethodName(), OutDatatype.VOID, om.getOmargList()));
          }
        }
      }
    } else {
      boolean first = true;
      for (Outputmethod om : list) {
        if (om.isClass()) {
          // TODO: Klass-instansen m�ste l�ggas i en separat variabel.
          String c = om.getArgClass(); // OBS!!! - l�gg in �vers�ttning
          String v = om.getArgName(); // OBS!! - �vers�tt
          if (first) {
            first = false;
                        out.addStatement(new PopDeclStatement(om.getArgClass(), om.getArgName(), om.getArgClass()));
          }
                    PeekStatement peekStatement = new PeekStatement(om.getClassName(), om.getMethodName(), OutDatatype.VARIABLE, null);
                    peekStatement.setVariableName(v);
                    out.addStatement(peekStatement);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.laja.parser.template.PeekStatement

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.