webit.script.core.ast.statements.Interpolation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webit-script Show documentation
Show all versions of webit-script Show documentation
a template-like script and engine, all writen with Java.
The newest version!
// Copyright (c) 2013-2014, Webit Team. All Rights Reserved.
package webit.script.core.ast.statements;
import webit.script.Context;
import webit.script.core.ast.Expression;
import webit.script.core.ast.Statement;
/**
*
* @author Zqq
*/
public final class Interpolation extends Statement {
private final Expression expr;
public Interpolation(Expression expr) {
super(expr.line, expr.column);
this.expr = expr;
}
public Interpolation(Expression expr, int line, int column) {
super(line, column);
this.expr = expr;
}
public Object execute(final Context context) {
context.out(expr.execute(context));
return null;
}
}