feat: add active node settings

This commit is contained in:
2024-04-23 19:14:27 +02:00
parent 6ea4afa012
commit 198a868fc6
14 changed files with 293 additions and 148 deletions

View File

@ -49,8 +49,12 @@ pub fn include_definition_file(input: TokenStream) -> TokenStream {
});
// Optionally, validate that the content is valid JSON
let _: NodeDefinition = serde_json::from_str(&json_content)
.unwrap_or_else(|err| panic!("JSON file contains invalid JSON: {}", err));
let _: NodeDefinition = serde_json::from_str(&json_content).unwrap_or_else(|err| {
panic!(
"JSON file contains invalid JSON: \n {} \n {}",
json_content, err
)
});
// Generate the function that returns the JSON string
let expanded = quote! {