mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-29 13:24:48 +00:00

The LoweredItem and LoweredComponent contained, in essence, the same information as the Element and Component in object_tree. Since the moving declarations pass moved everything to the root element and the LoweredPropertyDeclarations have been removed as well, this is the last step.
39 lines
887 B
Rust
39 lines
887 B
Rust
/*!
|
|
# The SixtyFPS compiler
|
|
|
|
The different modules tage the source code and transform into data structures
|
|
according to the following schema
|
|
|
|
```text
|
|
source code -> parser -> object_tree -> lower -> generator
|
|
```
|
|
|
|
*/
|
|
|
|
#[cfg(feature = "proc_macro_span")]
|
|
extern crate proc_macro;
|
|
|
|
pub mod diagnostics;
|
|
pub mod expression_tree;
|
|
pub mod generator;
|
|
pub mod object_tree;
|
|
pub mod parser;
|
|
pub mod typeregister;
|
|
|
|
mod passes {
|
|
pub mod inlining;
|
|
pub mod move_declarations;
|
|
pub mod resolving;
|
|
pub mod unique_id;
|
|
}
|
|
|
|
pub fn run_passes(
|
|
doc: &object_tree::Document,
|
|
diag: &mut diagnostics::Diagnostics,
|
|
tr: &mut typeregister::TypeRegister,
|
|
) {
|
|
passes::resolving::resolve_expressions(doc, diag, tr);
|
|
passes::inlining::inline(doc);
|
|
passes::unique_id::assign_unique_id(&doc.root_component);
|
|
passes::move_declarations::move_declarations(&doc.root_component);
|
|
}
|