fyi: prototype for patch/external
jmesserly opened this issue · comments
Jenny Messerly commented
It uses @patch
to validate that the member matches up with an external one, because that's the convention in core libraries. We use this in DDC for transforming @patch
/external into something that's valid Dart code. Linking here, in case it helps you with the transformer version.
Jenny Messerly commented
Oh, caveat, it doesn't implement separate private namespace. That could be done with name mangling, I suppose.
Jenny Messerly commented
Oh, and I used a string edit buffer technique rather than AST pretty printing to preserve human readability/formatting to maximum extent possible. (also hit some issues with analyzer's AST printer)