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

Side by Side Diff: tests/compiler/dart2js/parser_helper.dart

Issue 2110323003: Support serialization of loadLibrary (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt Created 4 years, 5 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 parser_helper; 5 library parser_helper;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 8
9 import "package:compiler/src/elements/elements.dart"; 9 import "package:compiler/src/elements/elements.dart";
10 import 'package:compiler/src/id_generator.dart'; 10 import 'package:compiler/src/id_generator.dart';
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 infos.forEach(log); 63 infos.forEach(log);
64 } 64 }
65 65
66 void reportWarning( 66 void reportWarning(
67 DiagnosticMessage message, 67 DiagnosticMessage message,
68 [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) { 68 [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
69 log(message); 69 log(message);
70 infos.forEach(log); 70 infos.forEach(log);
71 } 71 }
72 72
73 void reportInfo(Spannable node, MessageKind errorCode, [Map arguments]) { 73 void reportInfo(Spannable node, MessageKind errorCode,
74 [Map arguments = const {}]) {
Johnni Winther 2016/06/30 11:09:33 Ditto
74 log(new Message(MessageTemplate.TEMPLATES[errorCode], arguments, false)); 75 log(new Message(MessageTemplate.TEMPLATES[errorCode], arguments, false));
75 } 76 }
76 77
77 void reportHint( 78 void reportHint(
78 DiagnosticMessage message, 79 DiagnosticMessage message,
79 [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) { 80 [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
80 log(message); 81 log(message);
81 infos.forEach(log); 82 infos.forEach(log);
82 } 83 }
83 84
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 reporter.withCurrentElement(unit, () => parser.parseUnit(tokens)); 163 reporter.withCurrentElement(unit, () => parser.parseUnit(tokens));
163 return unit.localMembers; 164 return unit.localMembers;
164 } 165 }
165 166
166 NodeList fullParseUnit(String source, {DiagnosticReporter reporter}) { 167 NodeList fullParseUnit(String source, {DiagnosticReporter reporter}) {
167 return parseBodyCode( 168 return parseBodyCode(
168 source, 169 source,
169 (parser, tokens) => parser.parseUnit(tokens), 170 (parser, tokens) => parser.parseUnit(tokens),
170 reporter: reporter); 171 reporter: reporter);
171 } 172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698