Refactor.
This commit is contained in:
@@ -4,13 +4,13 @@ Re-Optimize an AST
|
||||
{{#include ../../links.md}}
|
||||
|
||||
Sometimes it is more efficient to store one single, large script with delimited code blocks guarded by
|
||||
constant variables. This script is compiled once to an `AST`.
|
||||
constant variables. This script is compiled once to an [`AST`].
|
||||
|
||||
Then, depending on the execution environment, constants are passed into the [`Engine`] and the `AST`
|
||||
Then, depending on the execution environment, constants are passed into the [`Engine`] and the [`AST`]
|
||||
is _re_-optimized based on those constants via the `Engine::optimize_ast` method,
|
||||
effectively pruning out unused code sections.
|
||||
|
||||
The final, optimized `AST` is then used for evaluations.
|
||||
The final, optimized [`AST`] is then used for evaluations.
|
||||
|
||||
```rust
|
||||
// Compile master script to AST
|
||||
|
Reference in New Issue
Block a user