
at.$for Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of at-lang Show documentation
Show all versions of at-lang Show documentation
Basic commands set for the at lang
The newest version!
package at;
import static java.lang.String.valueOf;
import org.bitbucket.gkutiel.at.Cmd;
import org.bitbucket.gkutiel.at.Context;
import org.bitbucket.gkutiel.at.ContextVal;
public class $for extends Cmd {
@Override public String eval(final Context ctx) {
final Context list = ctx.get(args);
if (list == null) return "";
final StringBuilder str = new StringBuilder();
int i = 0;
for (final Context c : list) {
c.set("#", new ContextVal(ctx, valueOf(++i)));
str.append(evalChildren(c));
}
return str.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy