Chromium Code Reviews| Index: lib/compiler/implementation/scanner/scanner_task.dart |
| diff --git a/lib/compiler/implementation/scanner/scanner_task.dart b/lib/compiler/implementation/scanner/scanner_task.dart |
| index 25793e774c993f9cb0d23a0c13d0d24d8eb33a77..182fead08241514bd337828cedf26eb0c202feab 100644 |
| --- a/lib/compiler/implementation/scanner/scanner_task.dart |
| +++ b/lib/compiler/implementation/scanner/scanner_task.dart |
| @@ -58,10 +58,7 @@ class ScannerTask extends CompilerTask { |
| } |
| } else if (tag.isSource()) { |
| tagState = checkTag(TagState.SOURCE, tag); |
| - Script script = compiler.readScript(resolved, tag); |
| - CompilationUnitElement unit = |
| - new CompilationUnitElement(script, library); |
| - compiler.withCurrentElement(unit, () => scan(unit)); |
| + compiler.scanner.sourceTagInLibrary(tag, resolved, library); |
| } else if (tag.isResource()) { |
| tagState = checkTag(TagState.RESOURCE, tag); |
| compiler.reportWarning(tag, 'ignoring resource tag'); |
| @@ -88,6 +85,16 @@ class ScannerTask extends CompilerTask { |
| } |
| /** |
| + * Source a tag in the scope of [library]. The [path] given is used as is, |
|
Mads Ager (google)
2012/08/22 07:40:03
Handle a source tag in the scope of [library]?
At
Anders Johnsen
2012/08/22 13:02:27
Done.
|
| + * any resolve should be done beforehand. |
|
Mads Ager (google)
2012/08/22 07:40:03
any resolution
Anders Johnsen
2012/08/22 13:02:27
Done.
|
| + */ |
| + void sourceTagInLibrary(ScriptTag tag, Uri path, LibraryElement library) { |
|
Mads Ager (google)
2012/08/22 07:40:03
Rename. sourceScript? importSourceFromTag (to matc
Anders Johnsen
2012/08/22 13:02:27
Done.
|
| + Script script = compiler.readScript(path, tag); |
| + CompilationUnitElement unit = new CompilationUnitElement(script, library); |
| + compiler.withCurrentElement(unit, () => compiler.scanner.scan(unit)); |
| + } |
| + |
| + /** |
| * Handle an import script tag by importing the referenced library into the |
| * current library. |
| * Returns the resolved library [Uri]. |