Closed JeroMiya closed 5 years ago
We already do a full program analysis with the Dart Analyzer, that part is already done.
We are just creating the C# from the Semantic Model the Dart Analyzer provides us. Ideally we want it to be 100% automatically transpiled, as we don't want to maintain anything but the transpiler. However, we might do something like this, for a quick win early on, and we can setup the transpiler later for it.
I'm seeing a couple places where automated transpiling may be impossible (or at least require a full program analysis). For instance:
flutter/lib/src/foundation/annotations.dart
includes attributes, which in Dart are just regular classes. Without looking around the code for references to those attributes, there's no way to tell that those classes should be rewritten as C# attributes.So either we can spend time on the transpiler implementing that full program analysis or we can just have a map file that says, "when you see this file, use this hand-transpiled C# file from over here instead."
Something like this: