Generalise attributes and metadata the parsing phase and add support for missing CXX attributes #665
Labels
🤔 discussion
Feedback welcome
⬆️ feature
New feature or request
👷 refactor
Something needs to change
If we split the parser and generator phase to have a naming phase (as discussed in #572 (comment) )
An extension would be to make the parser phase like a tree, with each node having "metadata" (such as namespace, cxx_name, rust_name). This would then allow all types and blocks to have metadata tagged onto them as currently not all types or blocks support all the attributes.
Also being able to go from a leaf node to it's parent would be useful for the generation phase. As currently we have to pass in items such as the module_ident into the generation methods. When instead it could climb the tree until it finds the module. This would then allow each generation method to just take one node as a parameter. Which then could lead to the generation being written as a trait on the parser objects, eg GeneratedCpp -> TryFrom -> ParsedInvokable.
Consider this as part of a refactor of the parser phase.
The text was updated successfully, but these errors were encountered: