-
Notifications
You must be signed in to change notification settings - Fork 393
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
lcmgen: Emit file level comments #505
Conversation
Parse any comment before the `package` statement in the .lcm file and apply it to the top of generated source files right after the 'generated with LCM' statement. Does not apply if the package is defined via CLI flags. Implemented for: - [x] c - [x] cpp - [x] java - [x] python - [ ] go - [ ] lua - [ ] c# See test/types/lcmtest/comments_t.lcm and build/test/types/lcmtest/comments_t.*
I just realized multiple types can be defined in 1 |
https://lcm-proj.github.io/lcm/content/lcm-type-ref.html#type-specifications suggests (and also demands) one file per type. So should multiple types per file even be supported? |
@ihilt any thoughts? I had put off implementing the other languages until I got feedback. |
So to make sure I'm tracking: The LCM documentation implies that there should be one struct per
However, lcm-gen does support multiple structs per file and there's a chance that existing systems use it that way. But, this PR will not affect any of the existing support for multiple structs per file. Instead, it's adding a new feature: file-level comments. And the current state of the PR is that it only supports file-level comments for Assuming I'm tracking all that correctly, then I think it's fine to only support file-level comments for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Noticed one minor typo but just let me know whenever you want me to hit the merge button
fix typo Co-authored-by: nosracd <djcdan24@gmail.com>
Looks like accepting the suggestion didn't cause formatting errors so should be good to go |
Parse any comment before the
package
statement in the .lcm file and apply it to the top of generated source files right after the 'generated with LCM' statement.Does not apply if the package is defined via CLI flags.
Implemented for:
See test/types/lcmtest/comments_t.lcm and
build/test/types/lcmtest/comments_t.*