make creating rsx nodes from macros possible

This commit is contained in:
Evan Almloff committed 2023-06-29 12:52:27 -07:00
1 parent f5c60eeb4c
commit 8f67d0aafd
8 files changed
+54 -18

No files matched your search

+7
View File
@@ -20,6 +20,13 @@ pub struct IfmtInput {
}
impl IfmtInput {
pub fn new_static(input: &str) -> Self {
Self {
source: None,
segments: vec![Segment::Literal(input.to_string())],
}
}
pub fn is_static(&self) -> bool {
matches!(self.segments.as_slice(), &[Segment::Literal(_)] | &[])
}