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

fix Issue 22825 - #line parsing doesn't follow the spec #13727

Closed
wants to merge 1 commit into from

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Feb 27, 2022

Because these special token sequences are sensitive to newlines, they should not be allowed after the introducing # token.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Auto-close Bugzilla Severity Description
22825 normal #line parsing doesn't follow the spec

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#13727"

Comment on lines +212 to +214
this.tokenizeNewlines++;
scan(t);
this.tokenizeNewlines--;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshed topic, whether to just make this field a bool parameter of scan() or not. I'm on the fence either way.

Copy link
Member

@WalterBright WalterBright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this problem will take care of itself if you implement the changes requested in #13728

@ibuclaw
Copy link
Member Author

ibuclaw commented Feb 28, 2022

I think this problem will take care of itself if you implement the changes requested in #13728

#13728 only takes care of # line because of shared code path in case '#', but everything else that follows would still be in violation. As I said, this PR modifies poundLine, the other modifies pragmaPack.

@ibuclaw
Copy link
Member Author

ibuclaw commented Feb 28, 2022

Having read your comments, I see what you mean though, we'll wait and see after (or if) the other PR has been accepted though.

@ibuclaw
Copy link
Member Author

ibuclaw commented Feb 28, 2022

In the meantime, added a spec PR here dlang/dlang.org#3234

@WalterBright
Copy link
Member

@ibuclaw needs rebase!

@ibuclaw ibuclaw closed this Mar 18, 2022
@ibuclaw ibuclaw closed this Mar 18, 2022
@ibuclaw ibuclaw deleted the issue22825 branch March 18, 2022 17:17
@ibuclaw
Copy link
Member Author

ibuclaw commented Mar 18, 2022

Tests moved to #13728.

1 similar comment
@ibuclaw
Copy link
Member Author

ibuclaw commented Mar 18, 2022

Tests moved to #13728.

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

Successfully merging this pull request may close these issues.

4 participants