Closed ocornut closed 2 years ago
This seemed like a pretty good idea to me, so I've implemented it as suggested and it seems to work. There's no affect on the .h file output, but in the JSON there is now an is_internal
key that gets applied as appropriate. I've documented it with some notes to suggest implementers use it as a hint rather than an absolute barrier to access, as that seems most appropriate.
Great! The commit is 4318b1ebb5f9ca22a8d73ad6cf6095f6244c107e it seems to work well. I imagine we might discover small bugs or inconsistent tagging in original sources and we can fix stuff when it happens.
@emoon mentioned
I first looked at adding an
[Internal]
marker on every line, but I think this rule would also work:// [Internal]
, all following fields are internal until encountering an empty line.Assuming that's not difficult to handle in the parser/transform op. If it seems like a hassle I can add the marker on every line.
It would be good if dear_bindings could do that parsing and tag fields as "internal" for backend to decide.
I worry that hard-marking fields as non-visible in some languages may hinder some advanced use (there's sometime a blurry line where internal stuff can become useful), can Rust allow you to sort of bypass that?