lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
944 stars 385 forks source link

lcmgen: Emit file level comments #505

Open judfs opened 2 months ago

judfs commented 2 months ago

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.*

judfs commented 2 months ago

I just realized multiple types can be defined in 1 .lcm file. I did not account for that

judfs commented 1 month ago

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?