diff options
-rw-r--r-- | src/makefile/token.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/makefile/token.rs b/src/makefile/token.rs index 18a1773..44d8c8b 100644 --- a/src/makefile/token.rs +++ b/src/makefile/token.rs @@ -13,7 +13,10 @@ use nom::{ Finish, IResult, }; #[cfg(feature = "full")] -use nom::{character::complete::space1, multi::separated_list1}; +use nom::{ + character::complete::{space0, space1}, + multi::separated_list1, +}; trait Err<'a>: 'a + ParseError<&'a str> + ContextError<&'a str> {} impl<'a, T: 'a + ParseError<&'a str> + ContextError<&'a str>> Err<'a> for T {} @@ -210,7 +213,7 @@ fn function_call_body<'a, E: Err<'a>>( separated_pair( macro_function_name, space1, - separated_list1(tag(","), tokens_but_not(vec![',', end])), + separated_list1(pair(tag(","), space0), tokens_but_not(vec![',', end])), ), |(name, args)| Token::FunctionCall { name: name.into(), @@ -460,7 +463,7 @@ mod test { tokens, TokenString(vec![token_function_call( "foo", - vec![TokenString::text("bar"), tokenize(" $(baz)")?] + vec![TokenString::text("bar"), tokenize("$(baz)")?] )]) ); Ok(()) |