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

Parser permit nolol inline comments (untested) #122

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Woccz
Copy link
Contributor

@Woccz Woccz commented Apr 27, 2022

What this PR does / why we need it**:

Should allow for inlining of comments in nolol (untested).

Which issue(s) this PR fixes**:

Fixes #53

Checklist:

  • PR is done against develop-branch
  • includes tests for everything that changed
  • updated documentation (if necessary)

@dbaumgarten
Copy link
Owner

Unforunately, what you are trying to do here isn't that easy.
If you just skip the comments during parsing, like you are doing currently, the comments will be lost when auto-formatting code.
And that would be a bad thing.

All the comments must be saved during parsing, so that they can be re-inserted when printing the ast.
That makes all this much mor cumbersome, which is why I haven't bothered to implement comments at every single possible location.

@dbaumgarten dbaumgarten force-pushed the develop branch 3 times, most recently from a455d42 to fa1deae Compare June 26, 2022 12:57
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 this pull request may close these issues.

2 participants