Biohazrd icon indicating copy to clipboard operation
Biohazrd copied to clipboard

Add namespace awareness to relevant transformations

Open PathogenDavid opened this issue 3 years ago • 1 comments

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

PathogenDavid avatar Jan 20 '21 04:01 PathogenDavid

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

PathogenDavid avatar Jan 20 '21 04:01 PathogenDavid