Exemplo n.º 1
0
 public void genStatementBody(SetStatement stmt, Context ctx, TabbedWriter out) {
   for (int i = 0; i < stmt.getTargets().size(); i++) {
     Expression expression = stmt.getTargets().get(i);
     for (int j = 0; j < stmt.getStates().size(); j++) {
       String state = stmt.getStates().get(j);
       if (state.equalsIgnoreCase("empty")) {
         ctx.invoke(genExpression, expression, ctx, out, expression);
         out.print(".ezeSetEmpty()");
       } else if (state.equalsIgnoreCase("initial")) {
         ctx.invoke(genExpression, expression, ctx, out, expression);
         out.print(".ezeInitialize()");
       }
       if (j < stmt.getStates().size() - 1) out.println(";");
     }
   }
 }
Exemplo n.º 2
0
 @Override
 public boolean visit(org.eclipse.edt.compiler.core.ast.SetStatement setStatement) {
   SetStatement stmt = factory.createSetStatement();
   for (Node node : (List<Node>) setStatement.getSetTargets()) {
     node.accept(this);
     stmt.getTargets().add((Expression) stack.pop());
   }
   for (String state : (List<String>) setStatement.getStates()) {
     stmt.getStates().add(state);
   }
   stack.push(stmt);
   setElementInformation(setStatement, stmt);
   return false;
 }