aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/token.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile/token.rs')
-rw-r--r--src/makefile/token.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/makefile/token.rs b/src/makefile/token.rs
index eca40ed..8b21f06 100644
--- a/src/makefile/token.rs
+++ b/src/makefile/token.rs
@@ -19,6 +19,13 @@ impl TokenString {
Self(vec![Token::Text(text.into())])
}
+ pub(crate) fn r#macro(name: impl Into<String>) -> Self {
+ Self(vec![Token::MacroExpansion {
+ name: name.into(),
+ replacement: None,
+ }])
+ }
+
pub(crate) fn tokens(&self) -> impl Iterator<Item = &Token> {
self.0.iter()
}