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

Unified Diff: dart/lib/compiler/implementation/tools/mini_parser.dart

Issue 10831293: Update mini_parser.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/tools/mini_parser.dart
diff --git a/dart/lib/compiler/implementation/tools/mini_parser.dart b/dart/lib/compiler/implementation/tools/mini_parser.dart
index 62a4ea88bf0f9e011bf788395a0cee2b08fb331b..20bcb581d78292e9e192f1ea1bb678ead00252e9 100644
--- a/dart/lib/compiler/implementation/tools/mini_parser.dart
+++ b/dart/lib/compiler/implementation/tools/mini_parser.dart
@@ -13,9 +13,9 @@
#import('../scanner/scannerlib.dart');
#import('../tree/tree.dart');
#import('../util/characters.dart');
+#import('../source_file.dart');
#source('../diagnostic_listener.dart');
-#source('../../source.dart');
#source('../scanner/byte_array_scanner.dart');
#source('../scanner/byte_strings.dart');
@@ -32,7 +32,7 @@ void main() {
String stats =
'$classCount classes (${kb}Kb) in ${stopwatch.elapsedInMs()}ms';
if (errorCount != 0) {
- stats += ' with $errorCount errors';
+ stats = '$stats with $errorCount errors';
}
if (options.diet) {
print('Diet parsed $stats.');
@@ -209,7 +209,7 @@ String formatError(String message, Token beginToken, Token endToken,
String tokenString = endToken.toString();
int begin = beginToken.charOffset;
int end = endToken.charOffset + tokenString.length;
- return file.getLocationMessage(message, begin, end, true);
+ return file.getLocationMessage(message, begin, end, true, (x) => x);
}
class MyNodeListener extends NodeListener {
@@ -318,14 +318,6 @@ class MySourceFile extends SourceFile {
}
}
-// Hacks to allow sourcing in ../source.dart:
-var world = const Mock();
-var options = const Mock();
-String _GREEN_COLOR = '\u001b[32m';
-String _RED_COLOR = '\u001b[31m';
-String _MAGENTA_COLOR = '\u001b[35m';
-String _NO_COLOR = '\u001b[0m';
-
class Mock {
const Mock();
bool get useColors() => true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698