From 5a72fb28fb69a476437141a4eb898d6d001dd281 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Wed, 14 Apr 2021 20:17:42 -0600 Subject: implement potentially-mixed-quoted conditional args --- src/makefile/input.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/makefile/input.rs') diff --git a/src/makefile/input.rs b/src/makefile/input.rs index 5a1259f..4a0f086 100644 --- a/src/makefile/input.rs +++ b/src/makefile/input.rs @@ -569,13 +569,13 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> { fn read_rule(&mut self, line_tokens: TokenString, line_number: usize) -> Result<()> { let (targets, not_targets) = line_tokens - .split_once(':') + .split_once(":") .ok_or_else(|| eyre!("read_rule couldn't find a ':' on line {}", line_number))?; #[cfg(feature = "full")] let (static_targets, targets, not_targets) = if not_targets.contains_text(":") { // ugh, this is probably a Static Pattern Rule let (pattern, not_targets) = not_targets - .split_once(':') + .split_once(":") .ok_or_else(|| eyre!("bro hold the fuck up it literally just had that"))?; (Some(targets), pattern, not_targets) } else { @@ -583,7 +583,7 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> { }; let targets = self.expand_macros(&targets)?; let targets = targets.split_whitespace().collect::>(); - let (prerequisites, mut commands) = match not_targets.split_once(';') { + let (prerequisites, mut commands) = match not_targets.split_once(";") { Some((prerequisites, command)) => { // TODO make sure escaped newlines get retroactively treated correctly here (prerequisites, vec![command]) @@ -801,8 +801,8 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> { (line_tokens, value) } else { line_tokens - .split_once('=') - .ok_or_else(|| eyre!("read_rule couldn't find a ':' on line {}", line_number))? + .split_once("=") + .ok_or_else(|| eyre!("read_macro couldn't find a '=' on line {}", line_number))? }; let name = self.expand_macros(&name)?; // GNUisms are annoying, but popular -- cgit v1.2.3