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

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

Issue 40583002: Incorporates feedback by Nicolas for UTF-8 bytes based scanner CL (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 mock_compiler; 5 library mock_compiler;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:collection'; 9 import 'dart:collection';
10 10
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 if (visitor.scope is LibraryScope) { 378 if (visitor.scope is LibraryScope) {
379 visitor.scope = new MethodScope(visitor.scope, element); 379 visitor.scope = new MethodScope(visitor.scope, element);
380 } 380 }
381 visitor.visit(tree); 381 visitor.visit(tree);
382 visitor.scope = new LibraryScope(element.getLibrary()); 382 visitor.scope = new LibraryScope(element.getLibrary());
383 return visitor.mapping; 383 return visitor.mapping;
384 } 384 }
385 385
386 resolverVisitor() { 386 resolverVisitor() {
387 Element mockElement = 387 Element mockElement =
388 new ElementX('', ElementKind.FUNCTION, 388 new ElementX('', ElementKind.FUNCTION, mainApp.entryCompilationUnit);
389 mainApp.entryCompilationUnit);
390 ResolverVisitor visitor = 389 ResolverVisitor visitor =
391 new ResolverVisitor(this, mockElement, 390 new ResolverVisitor(this, mockElement,
392 new CollectingTreeElements(mockElement)); 391 new CollectingTreeElements(mockElement));
393 visitor.scope = new MethodScope(visitor.scope, mockElement); 392 visitor.scope = new MethodScope(visitor.scope, mockElement);
394 return visitor; 393 return visitor;
395 } 394 }
396 395
397 parseScript(String text, [LibraryElement library]) { 396 parseScript(String text, [LibraryElement library]) {
398 if (library == null) library = mainApp; 397 if (library == null) library = mainApp;
399 parseUnit(text, this, library, registerSource); 398 parseUnit(text, this, library, registerSource);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 } else { 499 } else {
501 sourceFile = compiler.sourceFiles[uri.toString()]; 500 sourceFile = compiler.sourceFiles[uri.toString()];
502 } 501 }
503 if (sourceFile != null && begin != null && end != null) { 502 if (sourceFile != null && begin != null && end != null) {
504 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x)); 503 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x));
505 } else { 504 } else {
506 print(message); 505 print(message);
507 } 506 }
508 }; 507 };
509 } 508 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/source_file.dart ('k') | tests/compiler/dart2js/patch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698