diff --git a/src/config/mod.rs b/src/config/mod.rs index a60ab18b0..77f9dd8c2 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -22,7 +22,6 @@ pub mod work_mode; pub use self::{ child_properties::{ChildProperties, ChildProperty}, config::Config, - external_libraries::ExternalLibrary, gobjects::GObject, property_generate_flags::PropertyGenerateFlags, string_type::StringType, diff --git a/src/library.rs b/src/library.rs index 5cdbd2a0f..63d24d3bd 100644 --- a/src/library.rs +++ b/src/library.rs @@ -82,9 +82,15 @@ pub enum ParameterScope { /// /// Can be invoked multiple times. Notified, + /// Forever scope + Forever, } impl ParameterScope { + pub fn is_forever(self) -> bool { + matches!(self, Self::Forever) + } + pub fn is_call(self) -> bool { matches!(self, Self::Call) } @@ -106,6 +112,7 @@ impl FromStr for ParameterScope { "call" => Ok(Self::Call), "async" => Ok(Self::Async), "notified" => Ok(Self::Notified), + "forever" => Ok(Self::Forever), _ => Err(format!("Unknown parameter scope type: {name}")), } } diff --git a/src/writer/mod.rs b/src/writer/mod.rs index 10ad567ef..09a4ee796 100644 --- a/src/writer/mod.rs +++ b/src/writer/mod.rs @@ -3,10 +3,7 @@ pub mod primitives; pub mod to_code; // TODO:remove pub pub mod untabber; -pub use self::{ - defines::{MAX_TEXT_WIDTH, TAB, TAB_SIZE}, - to_code::ToCode, -}; +pub use self::{defines::TAB, to_code::ToCode}; use crate::analysis::safety_assertion_mode::SafetyAssertionMode; pub fn safety_assertion_mode_to_str(s: SafetyAssertionMode) -> &'static str {