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

Trailing comments for all line-types #53

Open
Woccz opened this issue Jun 15, 2021 · 3 comments
Open

Trailing comments for all line-types #53

Woccz opened this issue Jun 15, 2021 · 3 comments
Labels
enhancement New feature or request nolol Issues only regarding NOLOL

Comments

@Woccz
Copy link
Contributor

Woccz commented Jun 15, 2021

Commenting after an include results in Expected newline. Found Token: '// the comment'(Comment) parser.
image

The same error occurs with macro
image

Same occurs with define
image

Thank you.

@Woccz Woccz added the bug Something isn't working label Jun 15, 2021
@Woccz Woccz changed the title Cannot comment after include Cannot comment after include or macro Jun 15, 2021
@Woccz Woccz changed the title Cannot comment after include or macro Cannot comment after include, macro, or define Jun 15, 2021
@dbaumgarten
Copy link
Owner

Well, that's technically not really a "bug". It's more a "works as inteded"/"missing feature".
Line-trailing comments are a feature of statement-lines.

Anything that isn't a line containing (only) statements (include, macro, define, mutiline-if-header, while-header) simply isn't designed to have comments.

It's possible to add this, and it would not be too hard.

In the meantime the workaround here is to just put the comment on a seperate line

@dbaumgarten dbaumgarten added enhancement New feature or request nolol Issues only regarding NOLOL and removed bug Something isn't working labels Jun 15, 2021
@dbaumgarten dbaumgarten changed the title Cannot comment after include, macro, or define Trailing comments for all line-types Jun 15, 2021
@Woccz
Copy link
Contributor Author

Woccz commented Jun 15, 2021

Ok I see. I did place the comments on another line, however, if you did implement commenting on those lines it would be helpful. Thank you.

@dbaumgarten
Copy link
Owner

It's not difficult to do, it's just work
It would probably make a good first issue to implement for someone new to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nolol Issues only regarding NOLOL
Projects
None yet
Development

No branches or pull requests

2 participants