-
Notifications
You must be signed in to change notification settings - Fork 26
Conversation
r? @hdamron17 I'm worried this will lose whitespace again while printing with |
As an alternative you could store the whitespace tokens and yield those tokens if no replacement was found. |
That sounds like a good idea |
As long as the macro is actually replaced then it is fine to consume the whitespace. The issue is if you have an id that is the name of a function macro but has is not used as one because it is not followed by a parenthesis. Can you |
Make a test using |
src/lex/replace.rs
Outdated
// If this branch is matched, this is not a macro call, | ||
// since all other cases are covered above. | ||
// So just append the identifier and the current token to the stack. | ||
Some(Ok(Locatable { data: _, .. })) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some(Ok(Locatable { data: _, .. })) => { | |
Some(Ok(_)) => { |
This comment has been minimized.
This comment has been minimized.
The test is still failing with the following error:
I can't figure out why so you have to look over it. |
This PR will skip any white spaces that occur in the
lex::replace::replace
method, to support macro calls wherethe identifier and the arguments are separated by spaces (e.g.
f (
).Resolves #457