Biohazrd
Biohazrd copied to clipboard
Add namespace awareness to relevant transformations
Because namespaces weren't initially supported in Biohazrd, some of the built-in transformations don't handle them properly. For instance, MoveLooseDeclarationsIntoTypesTransformation
effectively removes them from loose declarations.
- [x]
MoveLooseDeclarationsIntoTypesTransformation
- [x]
DeduplicateNamesTransformation
- [ ] Constant array infrastructure (and/or https://github.com/InfectedLibraries/Biohazrd/issues/139)
- [x] Double-check others
One thing I've realized is that once DeduplicateNamesTransformation
is namespace-aware, it is possible for name collisions to form when two namespaces with same-name types have using statements. Not sure if/how I want to handle that.
Edit: Going to consider this an unrelated issue to deal with when it comes up. (Might just add an optional output mode that fully-qualifies all translated type references. Won't be pretty, but it's likely the easiest fix for what is probably an unlikely situation.)