Module fxbox_thinkerbell::compile
[−]
[src]
Compiling an AST into something runnable. A script compiler
This compiler take untrusted code (Script<UncheckedCtx>) and
performs the following transformations and checks:
- Ensure that the
Scripthas at least oneRule. - Ensure that each
Rulehas at least oneMatch. - Ensure that each
Rulehas at least oneStatement. - Ensure that each
Matchhas at least onesource. - Ensure that each
Statementhas at least onedestination. - Ensure that in each
Match, the type ofrangematches thekind. - Ensure that in each
Statement, the type ofvaluematches thekind. - Transform each
Matchto make sure that the kind of thesourcematches thekind, even if devices change. - Transform each
Statementto make sure that the kind of thedestinationmatches thekind, even if devices change.
Structs
| CompiledCtx | |
| Compiler |
Enums
| Error | |
| SourceError | |
| TypeError |
Traits
| ExecutableDevEnv |
The environment in which the code is meant to be executed. This can typically be instantiated either with actual bindings to devices, or with a unit-testing framework. // FIXME: Move this to run.rs |