Implement and archive Phase 5 form designer
This commit is contained in:
@@ -60,6 +60,26 @@ pub fn compile_project(
|
||||
}
|
||||
|
||||
impl ProjectCompiler {
|
||||
/// Bindungen aus den tatsächlich übersetzten Modulen einschließlich ihrer Imports.
|
||||
pub fn bound_form_references(
|
||||
&self,
|
||||
) -> Result<tb_frontend::sema::BoundFormReferences, Vec<Diagnostic>> {
|
||||
let mut result = tb_frontend::sema::BoundFormReferences::default();
|
||||
for product in &self.products {
|
||||
let bound = tb_frontend::sema::bound_form_references(&product.module, &product.catalog);
|
||||
result.objects.extend(bound.objects);
|
||||
// Importierte Prototypen im Cache haben keine physische Quellposition.
|
||||
result
|
||||
.procedures
|
||||
.extend(bound.procedures.into_iter().filter(|(pos, _)| pos.line > 0));
|
||||
result.diagnostics.extend(bound.diagnostics);
|
||||
}
|
||||
if result.diagnostics.is_empty() {
|
||||
Ok(result)
|
||||
} else {
|
||||
Err(result.diagnostics)
|
||||
}
|
||||
}
|
||||
pub fn compile(
|
||||
&mut self,
|
||||
name: &str,
|
||||
|
||||
Reference in New Issue
Block a user