mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 06:41:14 +00:00
Fix return type of compile_syntax_node
All call sites are only interested in the root component, so might as well return that.
This commit is contained in:
parent
2425c366db
commit
09cae799d3
6 changed files with 12 additions and 12 deletions
|
@ -223,14 +223,14 @@ pub fn sixtyfps(stream: TokenStream) -> TokenStream {
|
|||
//println!("{:#?}", syntax_node);
|
||||
let compiler_config =
|
||||
CompilerConfiguration { include_paths: &include_paths, ..Default::default() };
|
||||
let (tree, mut diag) = compile_syntax_node(syntax_node, diag, &compiler_config);
|
||||
let (root_component, mut diag) = compile_syntax_node(syntax_node, diag, &compiler_config);
|
||||
//println!("{:#?}", tree);
|
||||
if diag.has_error() {
|
||||
diag.map_offsets_to_span(&tokens);
|
||||
return diag.into_token_stream().into();
|
||||
}
|
||||
|
||||
let result = generator::rust::generate(&tree.root_component, &mut diag);
|
||||
let result = generator::rust::generate(&root_component, &mut diag);
|
||||
|
||||
result
|
||||
.unwrap_or_else(|| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue