Chromium Code Reviews| Index: lib/compiler/implementation/patch_parser.dart |
| diff --git a/lib/compiler/implementation/patch_parser.dart b/lib/compiler/implementation/patch_parser.dart |
| index e2a2744e5a724cc2e41d6e923c065fc511b30e54..48768f2f696bd45e614159d803362929bd043e82 100644 |
| --- a/lib/compiler/implementation/patch_parser.dart |
| +++ b/lib/compiler/implementation/patch_parser.dart |
| @@ -37,7 +37,15 @@ class PatchParserTask extends leg.CompilerTask { |
| // TODO(lrn): These imports end up in the original library and are in |
| // scope for the original methods too. This should be fixed. |
| for (tree.ScriptTag tag in imports.toLink()) { |
| - compiler.scanner.importLibraryFromTag(tag, compilationUnit); |
| + if (tag.isSource()) { |
| + Uri resolved = patchUri.resolve(tag.argument.dartString.slowToString()); |
| + Script script = compiler.readScript(resolved, tag); |
|
Anton Muhin
2012/08/21 18:09:33
that looks pretty much like a clone of code om sca
|
| + CompilationUnitElement unit = |
| + new CompilationUnitElement(script, library); |
| + compiler.withCurrentElement(unit, () => compiler.scanner.scan(unit)); |
| + } else { |
| + compiler.scanner.importLibraryFromTag(tag, compilationUnit); |
| + } |
| } |
| } |