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

Side by Side Diff: pkg/analyzer2dart/lib/src/dart_backend.dart

Issue 548253003: First end-to-end capability in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 3 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
« no previous file with comments | « pkg/analyzer2dart/lib/src/cps_generator.dart ('k') | pkg/analyzer2dart/lib/src/driver.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
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.
4
5 library analyzer2dart.dart_backend;
6
7 import 'package:compiler/implementation/elements/elements.dart';
8 import 'package:compiler/implementation/dart_backend/dart_backend.dart';
9 import 'package:compiler/implementation/dart2jslib.dart';
10
11 import 'driver.dart';
12 import 'converted_world.dart';
13
14 void compileToDart(Driver driver, ConvertedWorld convertedWorld) {
15 DartOutputter outputter =
16 new DartOutputter(new Listener(), driver.outputProvider);
17 outputter.assembleProgram(
18 libraries: convertedWorld.libraries,
19 instantiatedClasses: convertedWorld.instantiatedClasses,
20 resolvedElements: convertedWorld.resolvedElements,
21 mainFunction: convertedWorld.mainFunction,
22 computeElementAst: (Element element) {
23 return DartBackend.createElementAst(
24 null, null, null, null, convertedWorld.getIr(element));
25 },
26 shouldOutput: (_) => true,
27 isSafeToRemoveTypeDeclarations: (_) => false);
28
29 }
30
31 class Listener implements DiagnosticListener {
32
33 @override
34 void internalError(Spannable spannable, message) {
35 // TODO: implement internalError
36 }
37
38 @override
39 void log(message) {
40 // TODO: implement log
41 }
42
43 @override
44 void reportError(Spannable node,
45 MessageKind errorCode,
46 [Map arguments = const {}]) {
47 // TODO: implement reportError
48 }
49
50 @override
51 void reportFatalError(Spannable node,
52 MessageKind errorCode,
53 [Map arguments = const {}]) {
54 // TODO: implement reportFatalError
55 }
56
57 @override
58 void reportHint(Spannable node,
59 MessageKind errorCode,
60 [Map arguments = const {}]) {
61 // TODO: implement reportHint
62 }
63
64 @override
65 void reportInfo(Spannable node,
66 MessageKind errorCode,
67 [Map arguments = const {}]) {
68 // TODO: implement reportInfo
69 }
70
71 @override
72 void reportWarning(Spannable node,
73 MessageKind errorCode,
74 [Map arguments = const {}]) {
75 // TODO: implement reportWarning
76 }
77
78 @override
79 SourceSpan spanFromSpannable(Spannable node) {
80 // TODO: implement spanFromSpannable
81 }
82
83 @override
84 withCurrentElement(element, f()) {
85 // TODO: implement withCurrentElement
86 }
87 }
OLDNEW
« no previous file with comments | « pkg/analyzer2dart/lib/src/cps_generator.dart ('k') | pkg/analyzer2dart/lib/src/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698