public class VarRef extends Expression implements IVarIndex
| 限定符和类型 | 字段和说明 |
|---|---|
VarAttribute[] |
attributes |
boolean |
hasSafe |
Expression |
safe |
int |
varIndex |
type| 构造器和说明 |
|---|
VarRef(VarAttribute[] attributes,
boolean hasSafe,
Expression safe,
GrammarToken token) |
VarRef(VarAttribute[] attributes,
boolean hasSafe,
Expression safe,
GrammarToken token,
GrammarToken firstToken) |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
evaluate(Context ctx) |
Object |
evaluateUntilLast(Context ctx)
计算所有表达式,知道最后一值,用于a.b[xx].c = 1 赋值,只计算到a.b[xx]
|
int |
getVarIndex() |
void |
infer(InferContext inferCtx) |
void |
setVarIndex(int index) |
getType, setTypepublic VarAttribute[] attributes
public Expression safe
public int varIndex
public boolean hasSafe
public VarRef(VarAttribute[] attributes, boolean hasSafe, Expression safe, GrammarToken token)
public VarRef(VarAttribute[] attributes, boolean hasSafe, Expression safe, GrammarToken token, GrammarToken firstToken)
public Object evaluate(Context ctx)
evaluate 在类中 Expressionpublic Object evaluateUntilLast(Context ctx)
ctx - public void setVarIndex(int index)
setVarIndex 在接口中 IVarIndexpublic int getVarIndex()
getVarIndex 在接口中 IVarIndexpublic void infer(InferContext inferCtx)
Copyright © 2018. All rights reserved.