| 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 |
| 5 class ScannerTask extends CompilerTask { | 7 class ScannerTask extends CompilerTask { |
| 6 ScannerTask(Compiler compiler) : super(compiler); | 8 ScannerTask(Compiler compiler) : super(compiler); |
| 7 String get name => 'Scanner'; | 9 String get name => 'Scanner'; |
| 8 | 10 |
| 9 void scanLibrary(LibraryElement library) { | 11 void scanLibrary(LibraryElement library) { |
| 10 var compilationUnit = library.entryCompilationUnit; | 12 var compilationUnit = library.entryCompilationUnit; |
| 11 compiler.log("scanning library ${compilationUnit.script.name}"); | 13 compiler.log("scanning library ${compilationUnit.script.name}"); |
| 12 scan(compilationUnit); | 14 scan(compilationUnit); |
| 13 } | 15 } |
| 14 | 16 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 32 dietParse(CompilationUnitElement compilationUnit, Token tokens) { | 34 dietParse(CompilationUnitElement compilationUnit, Token tokens) { |
| 33 measure(() { | 35 measure(() { |
| 34 Function idGenerator = compiler.getNextFreeClassId; | 36 Function idGenerator = compiler.getNextFreeClassId; |
| 35 ElementListener listener = | 37 ElementListener listener = |
| 36 new ElementListener(compiler, compilationUnit, idGenerator); | 38 new ElementListener(compiler, compilationUnit, idGenerator); |
| 37 PartialParser parser = new PartialParser(listener); | 39 PartialParser parser = new PartialParser(listener); |
| 38 parser.parseUnit(tokens); | 40 parser.parseUnit(tokens); |
| 39 }); | 41 }); |
| 40 } | 42 } |
| 41 } | 43 } |
| OLD | NEW |