diff options
author | Melody Horn <melody@boringcactus.com> | 2021-03-28 14:57:03 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-03-28 14:57:03 -0600 |
commit | bc5038e6c344803bce76add47b13ceaa61a5bde3 (patch) | |
tree | eec9a8fc36562aa4413cf8be8ef22910fdc75cac /src/makefile/token.rs | |
parent | 82278c3a5aa93204c963a63cc3cfefea1d0fb3fd (diff) | |
download | makers-bc5038e6c344803bce76add47b13ceaa61a5bde3.tar.gz makers-bc5038e6c344803bce76add47b13ceaa61a5bde3.zip |
almost implement all functions
Diffstat (limited to 'src/makefile/token.rs')
-rw-r--r-- | src/makefile/token.rs | 7 |
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() } |