添加 getId() getIndex() getRight()

This commit is contained in:
James 2017-08-02 15:35:37 +08:00
parent f951d5c793
commit 68894ea84a

View File

@ -70,6 +70,23 @@ public class Assign extends Expr {
this.location = location;
}
/**
* 获取 assign 表达式左侧标识符 id
* 在自定义指令中得到 id 可以得知该赋值表达式是针对哪个变量在操作有助于扩展
* 需求来源http://www.jfinal.com/share/379
*/
public String getId() {
return id;
}
public Expr getIndex() {
return index;
}
public Expr getRight() {
return right;
}
/**
* 赋值语句有返回值可以用于表达式计算
*/