| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of scanner; | |
| 6 | |
| 7 class ScannerTask extends CompilerTask { | 5 class ScannerTask extends CompilerTask { |
| 8 ScannerTask(Compiler compiler) : super(compiler); | 6 ScannerTask(Compiler compiler) : super(compiler); |
| 9 String get name => 'Scanner'; | 7 String get name => 'Scanner'; |
| 10 | 8 |
| 11 void scanLibrary(LibraryElement library) { | 9 void scanLibrary(LibraryElement library) { |
| 12 var compilationUnit = library.entryCompilationUnit; | 10 var compilationUnit = library.entryCompilationUnit; |
| 13 compiler.log("scanning library ${compilationUnit.script.name}"); | 11 compiler.log("scanning library ${compilationUnit.script.name}"); |
| 14 scan(compilationUnit); | 12 scan(compilationUnit); |
| 15 } | 13 } |
| 16 | 14 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 34 dietParse(CompilationUnitElement compilationUnit, Token tokens) { | 32 dietParse(CompilationUnitElement compilationUnit, Token tokens) { |
| 35 measure(() { | 33 measure(() { |
| 36 Function idGenerator = compiler.getNextFreeClassId; | 34 Function idGenerator = compiler.getNextFreeClassId; |
| 37 ElementListener listener = | 35 ElementListener listener = |
| 38 new ElementListener(compiler, compilationUnit, idGenerator); | 36 new ElementListener(compiler, compilationUnit, idGenerator); |
| 39 PartialParser parser = new PartialParser(listener); | 37 PartialParser parser = new PartialParser(listener); |
| 40 parser.parseUnit(tokens); | 38 parser.parseUnit(tokens); |
| 41 }); | 39 }); |
| 42 } | 40 } |
| 43 } | 41 } |
| OLD | NEW |