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

Side by Side Diff: pkg/compiler/lib/src/parser/diet_parser_task.dart

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes after rebase. Created 5 years, 2 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library dart2js.parser.diet.task; 5 library dart2js.parser.diet.task;
6 6
7 import '../common/tasks.dart' show 7 import '../common/tasks.dart' show
8 CompilerTask; 8 CompilerTask;
9 import '../compiler.dart' show 9 import '../compiler.dart' show
10 Compiler; 10 Compiler;
(...skipping 12 matching lines...) Expand all
23 PartialParser; 23 PartialParser;
24 24
25 class DietParserTask extends CompilerTask { 25 class DietParserTask extends CompilerTask {
26 DietParserTask(Compiler compiler) : super(compiler); 26 DietParserTask(Compiler compiler) : super(compiler);
27 final String name = 'Diet Parser'; 27 final String name = 'Diet Parser';
28 28
29 dietParse(CompilationUnitElement compilationUnit, Token tokens) { 29 dietParse(CompilationUnitElement compilationUnit, Token tokens) {
30 measure(() { 30 measure(() {
31 Function idGenerator = compiler.getNextFreeClassId; 31 Function idGenerator = compiler.getNextFreeClassId;
32 ElementListener listener = 32 ElementListener listener =
33 new ElementListener(compiler, compilationUnit, idGenerator); 33 new ElementListener(compiler.reporter, compilationUnit, idGenerator);
34 PartialParser parser = new PartialParser(listener); 34 PartialParser parser = new PartialParser(listener);
35 try { 35 try {
36 parser.parseUnit(tokens); 36 parser.parseUnit(tokens);
37 } on ParserError catch(_) { 37 } on ParserError catch(_) {
38 assert(invariant(compilationUnit, compiler.compilationFailed)); 38 assert(invariant(compilationUnit, compiler.compilationFailed));
39 } 39 }
40 }); 40 });
41 } 41 }
42 } 42 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ordered_typeset.dart ('k') | pkg/compiler/lib/src/parser/element_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698