Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Unified Diff: pkg/polymer/lib/src/build/mirrors_remover.dart

Issue 211393006: Enables codegen support in polymer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/polymer/lib/src/build/linter.dart ('k') | pkg/polymer/lib/src/build/script_compactor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/build/mirrors_remover.dart
diff --git a/pkg/polymer/lib/src/build/mirrors_remover.dart b/pkg/polymer/lib/src/build/mirrors_remover.dart
index 5c58c397fda924631a612b507285604c31da6b62..60b9e2b2d1c05b23e0956c9fb3b34c37d75a2e92 100644
--- a/pkg/polymer/lib/src/build/mirrors_remover.dart
+++ b/pkg/polymer/lib/src/build/mirrors_remover.dart
@@ -23,16 +23,17 @@ class MirrorsRemover extends Transformer {
return transform.primaryInput.readAsString().then((code) {
// Note: this rewrite is highly-coupled with how polymer.dart is
// written. Make sure both are updated in sync.
- var start = code.indexOf('@MirrorsUsed');
+ var start = code.indexOf('@MirrorsUsed(');
if (start == -1) _error();
var end = code.indexOf('show MirrorsUsed;', start);
if (end == -1) _error();
+ end = code.indexOf('\n', end);
var loaderImport = code.indexOf(
"import 'src/mirror_loader.dart' as loader;", end);
if (loaderImport == -1) _error();
var sb = new StringBuffer()
..write(code.substring(0, start))
- ..write(code.susbtring(end)
+ ..write(code.substring(end)
.replaceAll('src/mirror_loader.dart', 'src/static_loader.dart'));
transform.addOutput(new Asset.fromString(id, sb.toString()));
« no previous file with comments | « pkg/polymer/lib/src/build/linter.dart ('k') | pkg/polymer/lib/src/build/script_compactor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698