-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add support for inline comments #11
base: main
Are you sure you want to change the base?
Conversation
I don't see a hard requirement for this in any spec, but it's a convention that makes sense.
…inition to avoid seeing commas in arrays with comments at the end. Make comments a valid end-of-dictionary-value delimiter.
Thanks for your contribution! I want to get some unit tests in this repo to ensure contributions are not breaking previous syntax highlighting features, but I have not sat down and thought about it for too long. How are you testing your changes, and what files have you tested your syntax highlighting enhancements with? |
Nice to see you're still around. Unittests would be the right approach for the CI pipeline.
|
Perfect. I'll take a peak around the space to see how others are unit testing textmate grammars, and work through some tests of at least some of the areas I was struggling with initially when releasing this. If that is delaying the PR for too long I'll do a quick visual regression test then merge. |
I've successfully automated the (comment-centric) unittests using the |
@thejustinwalsh, it's been a few weeks. Have you been able to check unittesting? |
Hey, I’ve been busy hustling for a new role. I plan to add the unit test feature you propose in this PR and a few core unit tests. Then, I’ll run your commit against the unit tests to ensure we don’t regress core highlighting features. I’m not entirely happy with the nested object matching logic, so unit tests will help us refactor boldly. I’ll add this to my Monday task list. Thanks for your patience. |
@jumarini check out these additional comments that are allowed between syntax elements... value: -
# comment
2.0 # Valid: whitespace and comments between '-' and '2.0'. https://protobuf.dev/reference/protobuf/textformat-spec/#parsing |
…tween sign and constant.
That's awful - I'm really hoping that use is rare. I'd recommend pushing it to a new issue to address. |
Right! When I built this I had no spec, so I will lump it into what I think is turning into another refactor. |
Added inline comment support. This required a bit of cleanup of existing field definitions. Tested with VS Code 1.94.2.
Issue: #10