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

Side by Side Diff: dart/lib/compiler/implementation/tools/mini_parser.dart

Issue 10876008: Remove most superfluous getter arguments from dart2js. (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 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 #library('parser'); 5 #library('parser');
6 6
7 #import('dart:io'); 7 #import('dart:io');
8 8
9 #import('../../../utf/utf.dart'); 9 #import('../../../utf/utf.dart');
10 10
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 bool readOnly = false; 295 bool readOnly = false;
296 bool buildAst = false; 296 bool buildAst = false;
297 } 297 }
298 298
299 class MySourceFile extends SourceFile { 299 class MySourceFile extends SourceFile {
300 final rawText; 300 final rawText;
301 var stringText; 301 var stringText;
302 302
303 MySourceFile(filename, this.rawText) : super(filename, null); 303 MySourceFile(filename, this.rawText) : super(filename, null);
304 304
305 String get text() { 305 String get text {
306 if (rawText is String) { 306 if (rawText is String) {
307 return rawText; 307 return rawText;
308 } else { 308 } else {
309 if (stringText === null) { 309 if (stringText === null) {
310 stringText = new String.fromCharCodes(rawText); 310 stringText = new String.fromCharCodes(rawText);
311 if (stringText.endsWith('\u0000')) { 311 if (stringText.endsWith('\u0000')) {
312 // Strip trailing NUL used by ByteArrayScanner to signal EOF. 312 // Strip trailing NUL used by ByteArrayScanner to signal EOF.
313 stringText = stringText.substring(0, stringText.length - 1); 313 stringText = stringText.substring(0, stringText.length - 1);
314 } 314 }
315 } 315 }
316 return stringText; 316 return stringText;
317 } 317 }
318 } 318 }
319 319
320 set text(String newText) { 320 set text(String newText) {
321 throw "not supported"; 321 throw "not supported";
322 } 322 }
323 } 323 }
324 324
325 class Mock { 325 class Mock {
326 const Mock(); 326 const Mock();
327 bool get useColors() => true; 327 bool get useColors => true;
328 internalError(message) { throw message.toString(); } 328 internalError(message) { throw message.toString(); }
329 } 329 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/ssa/value_set.dart ('k') | dart/lib/compiler/implementation/tree/dartstring.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698