diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-06 20:37:24 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-06 20:37:24 -0600 |
commit | 06eeecc0defec91a6e0fa8eb4acff27a59785e66 (patch) | |
tree | d820b6dc97399f74b86baa968d833ab683fc74ac /src/makefile/token.rs | |
parent | aa386feb7f0a78d3d8789b18cd280db405941b21 (diff) | |
download | makers-06eeecc0defec91a6e0fa8eb4acff27a59785e66.tar.gz makers-06eeecc0defec91a6e0fa8eb4acff27a59785e66.zip |
skip rule-specific macros instead of trying to parse them as prereqs
Diffstat (limited to 'src/makefile/token.rs')
-rw-r--r-- | src/makefile/token.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/makefile/token.rs b/src/makefile/token.rs index 63c48d9..294e80d 100644 --- a/src/makefile/token.rs +++ b/src/makefile/token.rs @@ -134,6 +134,16 @@ impl TokenString { _ => false, } } + + pub fn contains_text(&self, pattern: &str) -> bool { + self.0.iter().any(|x| { + if let Token::Text(x) = x { + x.contains(pattern) + } else { + false + } + }) + } } impl fmt::Display for TokenString { |