From 06eeecc0defec91a6e0fa8eb4acff27a59785e66 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Tue, 6 Apr 2021 20:37:24 -0600 Subject: skip rule-specific macros instead of trying to parse them as prereqs --- src/makefile/token.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/makefile/token.rs') 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 { -- cgit v1.2.3