enjoy 3.3 release ^_^

This commit is contained in:
James
2017-11-21 22:43:34 +08:00
parent 28eb105ffa
commit 61aa1d2082
70 changed files with 3378 additions and 299 deletions

View File

@@ -16,11 +16,11 @@
package com.jfinal.template.stat.ast;
import java.io.Writer;
import com.jfinal.template.Env;
import com.jfinal.template.expr.ast.Assign;
import com.jfinal.template.expr.ast.Expr;
import com.jfinal.template.expr.ast.ExprList;
import com.jfinal.template.io.Writer;
import com.jfinal.template.stat.Ctrl;
import com.jfinal.template.stat.Location;
import com.jfinal.template.stat.ParseException;
@@ -33,7 +33,7 @@ import com.jfinal.template.stat.Scope;
*/
public class SetGlobal extends Stat {
private ExprList exprList;
private Expr expr;
public SetGlobal(ExprList exprList, Location location) {
if (exprList.length() == 0) {
@@ -45,14 +45,14 @@ public class SetGlobal extends Stat {
throw new ParseException("#setGlobal directive only supports assignment expressions", location);
}
}
this.exprList = exprList;
this.expr = exprList.getActualExpr();
}
public void exec(Env env, Scope scope, Writer writer) {
Ctrl ctrl = scope.getCtrl();
try {
ctrl.setGlobalAssignment();
exprList.eval(scope);
expr.eval(scope);
} finally {
ctrl.setWisdomAssignment();
}