Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitespace used in token pasting #25

Closed
TimePath opened this issue Dec 28, 2014 · 5 comments
Closed

Whitespace used in token pasting #25

TimePath opened this issue Dec 28, 2014 · 5 comments

Comments

@TimePath
Copy link
Contributor

Input (groovy):

def pp = new Preprocessor();
pp.addInput(new StringLexerSource("""
#define ONE(arg) one_##arg
#define TWO(arg) ONE(two_##arg)

TWO(good)
TWO(     /* evil newline */
    bad)

ONE(good)
ONE(     /* evil newline */
    bad)
""", true))
println new CppReader(pp).text.trim()

Output:

one_two_good
    one_two_ bad

    one_good
    one_
 bad

Expected output:

one_two_good
one_two_bad

one_good
one_bad
@shevek
Copy link
Owner

shevek commented Dec 31, 2014

Republishing temporarily blocked on bmuschko/gradle-nexus-plugin#41 - working on it.

@TimePath
Copy link
Contributor Author

Thanks for the update

@shevek
Copy link
Owner

shevek commented Dec 31, 2014

Found a much simpler and cleaner fix. Can you review please?

@TimePath
Copy link
Contributor Author

Still works for my use case.

@shevek
Copy link
Owner

shevek commented Dec 31, 2014

Snapshot released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants