EExpr
From Erights
(Difference between revisions)
m |
|||
Line 5: | Line 5: | ||
{{instance msgdoc|compile|1|env :Scope|CompiledE}} | {{instance msgdoc|compile|1|env :Scope|CompiledE}} | ||
- | Compile the expression to an internal form (currently | + | Compile the expression to an internal form (e.g. currently Transformed-E, but could be Java bytecode). The result is a Thunk which can be invoked to evaluate the code in the given environment. |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
{{instance msgdoc|eval|1|env :Scope|any}} | {{instance msgdoc|eval|1|env :Scope|any}} | ||
Convenience method to compile and evaluate the expression in one go. | Convenience method to compile and evaluate the expression in one go. |
Revision as of 14:40, 9 June 2010
A parsed Kernel-E expression.
Protocol
compile/1
- Signature: compile(env :Scope) :CompiledE
Compile the expression to an internal form (e.g. currently Transformed-E, but could be Java bytecode). The result is a Thunk which can be invoked to evaluate the code in the given environment.
eval/1
- Signature: eval(env :Scope) :any
Convenience method to compile and evaluate the expression in one go.