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

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

Issue 10942028: Support class and typedef literals as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix two long lines. Created 8 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 #import("dart:uri"); 1 #import("dart:uri");
2 #import("../../../lib/compiler/implementation/elements/elements.dart"); 2 #import("../../../lib/compiler/implementation/elements/elements.dart");
3 #import('../../../lib/compiler/implementation/scanner/scannerlib.dart'); 3 #import('../../../lib/compiler/implementation/scanner/scannerlib.dart');
4 #import('../../../lib/compiler/implementation/source_file.dart'); 4 #import('../../../lib/compiler/implementation/source_file.dart');
5 #import('../../../lib/compiler/implementation/types/types.dart'); 5 #import('../../../lib/compiler/implementation/types/types.dart');
6 #import('../../../lib/compiler/implementation/tree/tree.dart'); 6 #import('../../../lib/compiler/implementation/tree/tree.dart');
7 #import("../../../lib/compiler/implementation/leg.dart", prefix: "leg"); 7 #import("../../../lib/compiler/implementation/leg.dart", prefix: "leg");
8 8
9 #import("parser_helper.dart"); 9 #import("parser_helper.dart");
10 #import("compiler_helper.dart"); 10 #import("compiler_helper.dart");
11 #import("mock_compiler.dart"); 11 #import("mock_compiler.dart");
12 12
13 /** 13 /**
14 * Finds the node corresponding to the last occurence of the substring 14 * Finds the node corresponding to the last occurence of the substring
15 * [: identifier; :] in the program represented by the visited AST. 15 * [: identifier; :] in the program represented by the visited AST.
16 */ 16 */
17 class VariableFinderVisitor extends Visitor { 17 class VariableFinderVisitor extends Visitor {
18 final String identifier; 18 final String identifier;
19 Node result; 19 Node result;
20 20
21 VariableFinderVisitor(this.identifier); 21 VariableFinderVisitor(this.identifier);
22 22
23 visitSend(Send node) { 23 visitSend(Send node) {
24 if (node.isPropertyAccess 24 if (node.isPropertyAccessOrTypeReference
25 && node.selector.asIdentifier().source.slowToString() == identifier) { 25 && node.selector.asIdentifier().source.slowToString() == identifier) {
26 result = node; 26 result = node;
27 } else { 27 } else {
28 node.visitChildren(this); 28 node.visitChildren(this);
29 } 29 }
30 } 30 }
31 31
32 visitNode(Node node) { 32 visitNode(Node node) {
33 node.visitChildren(this); 33 node.visitChildren(this);
34 } 34 }
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 testTernaryIf(); 308 testTernaryIf();
309 testWhile(); 309 testWhile();
310 testNonRecusiveFunction(); 310 testNonRecusiveFunction();
311 testRecusiveFunction(); 311 testRecusiveFunction();
312 testMutuallyRecusiveFunction(); 312 testMutuallyRecusiveFunction();
313 testConstructor(); 313 testConstructor();
314 testGetters(); 314 testGetters();
315 testSetters(); 315 testSetters();
316 testNamedParameters(); 316 testNamedParameters();
317 } 317 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698