robotpy / robotpy-cppheaderparser

DEPRECATED: use cxxheaderparser instead
Other
123 stars 39 forks source link

Line number information for #pragmas #45

Closed GardenTools closed 4 years ago

GardenTools commented 4 years ago

I've added capturing of line number information for pragmas, defines and includes. I've left the existing lists of strings untouched to preserve the existing interface and added new members to store the additional information

virtuald commented 4 years ago

I'm trying to get away from doing preprocessing, but this seems to work well enough.

GardenTools commented 4 years ago

It was motivated by wanting to be able to identify the positions of structure packing pragmas such as https://gcc.gnu.org/onlinedocs/gcc-4.4.4/gcc/Structure_002dPacking-Pragmas.html in relation to structure definitions.