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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart

Issue 11726005: Dartdoc comments retrieved as metadata through dart2js mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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; 5 part of scanner;
6 6
7 class ScannerTask extends CompilerTask { 7 class ScannerTask extends CompilerTask {
8 ScannerTask(Compiler compiler) : super(compiler); 8 ScannerTask(Compiler compiler) : super(compiler);
9 String get name => 'Scanner'; 9 String get name => 'Scanner';
10 10
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 void scan(CompilationUnitElement compilationUnit) { 23 void scan(CompilationUnitElement compilationUnit) {
24 measure(() { 24 measure(() {
25 scanElements(compilationUnit); 25 scanElements(compilationUnit);
26 }); 26 });
27 } 27 }
28 28
29 void scanElements(CompilationUnitElement compilationUnit) { 29 void scanElements(CompilationUnitElement compilationUnit) {
30 Script script = compilationUnit.script; 30 Script script = compilationUnit.script;
31 Token tokens = new StringScanner(script.text).tokenize(); 31 Token tokens = new StringScanner(script.text,
32 includeComments: compiler.preserveComments).tokenize();
33 if (compiler.preserveComments) {
34 tokens = compiler.processAndStripComments(tokens);
35 }
32 compiler.dietParser.dietParse(compilationUnit, tokens); 36 compiler.dietParser.dietParse(compilationUnit, tokens);
33 } 37 }
34 } 38 }
35 39
36 class DietParserTask extends CompilerTask { 40 class DietParserTask extends CompilerTask {
37 DietParserTask(Compiler compiler) : super(compiler); 41 DietParserTask(Compiler compiler) : super(compiler);
38 final String name = 'Diet Parser'; 42 final String name = 'Diet Parser';
39 43
40 dietParse(CompilationUnitElement compilationUnit, Token tokens) { 44 dietParse(CompilationUnitElement compilationUnit, Token tokens) {
41 measure(() { 45 measure(() {
42 Function idGenerator = compiler.getNextFreeClassId; 46 Function idGenerator = compiler.getNextFreeClassId;
43 ElementListener listener = 47 ElementListener listener =
44 new ElementListener(compiler, compilationUnit, idGenerator); 48 new ElementListener(compiler, compilationUnit, idGenerator);
45 PartialParser parser = new PartialParser(listener); 49 PartialParser parser = new PartialParser(listener);
46 parser.parseUnit(tokens); 50 parser.parseUnit(tokens);
47 }); 51 });
48 } 52 }
49 } 53 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart ('k') | sdk/lib/_internal/dartdoc/lib/dartdoc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698