Skip to content

Commit

Permalink
transpile: don't assume macro invocations are whitespace-free
Browse files Browse the repository at this point in the history
  • Loading branch information
fw-immunant committed Sep 5, 2024
1 parent b9339f4 commit 6dafc3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c2rust-transpile/src/translator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4012,7 +4012,7 @@ impl<'c> Translation<'c> {
text: &str,
) -> Option<WithStmts<Box<Expr>>> {
let mut split = text.splitn(2, '(');
let ident = split.next()?;
let ident = split.next()?.trim();
let args = split.next()?.trim_end_matches(')');

let ts: TokenStream = syn::parse_str(args).ok()?;
Expand Down

0 comments on commit 6dafc3a

Please sign in to comment.