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

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

Issue 609783002: Support static field access in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 2 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 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 api.DiagnosticHandler createHandler(MockCompiler compiler, String text) { 368 api.DiagnosticHandler createHandler(MockCompiler compiler, String text) {
369 return (uri, int begin, int end, String message, kind) { 369 return (uri, int begin, int end, String message, kind) {
370 SourceFile sourceFile; 370 SourceFile sourceFile;
371 if (uri == null) { 371 if (uri == null) {
372 sourceFile = new StringSourceFile('analysis', text); 372 sourceFile = new StringSourceFile('analysis', text);
373 } else { 373 } else {
374 sourceFile = compiler.sourceFiles[uri.toString()]; 374 sourceFile = compiler.sourceFiles[uri.toString()];
375 } 375 }
376 if (sourceFile != null && begin != null && end != null) { 376 if (sourceFile != null && begin != null && end != null) {
377 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x)); 377 print(sourceFile.getLocationMessage(message, begin, end));
378 } else { 378 } else {
379 print(message); 379 print(message);
380 } 380 }
381 }; 381 };
382 } 382 }
383 383
384 class MockElement extends FunctionElementX { 384 class MockElement extends FunctionElementX {
385 MockElement(Element enclosingElement) 385 MockElement(Element enclosingElement)
386 : super('', ElementKind.FUNCTION, Modifiers.EMPTY, 386 : super('', ElementKind.FUNCTION, Modifiers.EMPTY,
387 enclosingElement, false); 387 enclosingElement, false);
388 388
389 get node => null; 389 get node => null;
390 390
391 parseNode(_) => null; 391 parseNode(_) => null;
392 392
393 bool get hasNode => false; 393 bool get hasNode => false;
394 } 394 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/source_file_provider.dart ('k') | tests/compiler/dart2js/private_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698