mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00
Add a diagnostics getter to ComponentCompiler
This commit is contained in:
parent
5b726cacbe
commit
e1f9347aaa
4 changed files with 71 additions and 0 deletions
|
@ -473,6 +473,9 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
using Diagnostic = sixtyfps::cbindgen_private::CDiagnostic;
|
||||
using DiagnosticLevel = sixtyfps::cbindgen_private::CDiagnosticLevel;
|
||||
|
||||
class ComponentCompiler
|
||||
{
|
||||
cbindgen_private::ComponentCompilerOpaque inner;
|
||||
|
@ -513,6 +516,13 @@ public:
|
|||
return paths;
|
||||
}
|
||||
|
||||
sixtyfps::SharedVector<Diagnostic> diagnostics() const
|
||||
{
|
||||
sixtyfps::SharedVector<Diagnostic> result;
|
||||
cbindgen_private::sixtyfps_interpreter_component_compiler_get_diagnostics(&inner, &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
std::optional<ComponentDefinition> build_from_source(std::string_view source_code,
|
||||
std::string_view path)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue