perf(dart/transform) Restructure transform to independent phases

Update summary:
- Removes the need for resolution, gaining transform speed at the cost
  of some precision and ability to detect errors
- Generates type registrations in the package alongside their declarations
- Ensures that line numbers do not change in transformed user code
This commit is contained in:
Tim Blasi
2015-03-10 19:19:02 -07:00
parent 08bd3a4443
commit d0aceef4e0
52 changed files with 1530 additions and 318 deletions
@@ -0,0 +1,19 @@
library angular2.src.transform.common.logging;
import 'package:barback/barback.dart';
import 'package:code_transformers/messages/build_logger.dart';
BuildLogger _logger;
/// Prepares [logger] for use throughout the transformer.
void init(Transform t) {
_logger = new BuildLogger(t);
}
/// The logger the transformer should use for messaging.
BuildLogger get logger {
if (_logger == null) {
throw new StateError('Logger never initialized.');
}
return _logger;
}