yodk icon indicating copy to clipboard operation
yodk copied to clipboard

Parser permit nolol inline comments (untested)

Open Woccz opened this issue 2 years ago • 1 comments

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:

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

Woccz avatar Apr 27 '22 14:04 Woccz

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 avatar Jun 26 '22 12:06 dbaumgarten