public class AstInterpreter extends Object
Interprets a Template given a MagicScriptContext to lookup variable values in and writes the evaluation results to an output
stream. Uses the global AbstractReflection instance as returned by AbstractReflection.getInstance() to access members and call
methods.
The interpeter traverses the AST as stored in MagicScript.getNodes(). the interpeter has a method for each AST node type
be written to the output stream.
| 构造器和说明 |
|---|
AstInterpreter() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Object |
interpret(MagicScript magicScript,
MagicScriptContext context,
Scope scope) |
static Object |
interpretNodeList(List<Node> nodes,
MagicScriptContext context,
Scope scope) |
public static Object interpret(MagicScript magicScript, MagicScriptContext context, Scope scope)
public static Object interpretNodeList(List<Node> nodes, MagicScriptContext context, Scope scope)
Copyright © 2020–2021. All rights reserved.