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

Side by Side Diff: pkg/analyzer2dart/test/identifier_semantics_test.dart

Issue 652403005: Support assignment of locals in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 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
« no previous file with comments | « pkg/analyzer2dart/test/end2end_data.dart ('k') | pkg/analyzer2dart/test/sexpr_data.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'package:unittest/unittest.dart'; 5 import 'package:unittest/unittest.dart';
6 import 'package:analyzer/file_system/memory_file_system.dart'; 6 import 'package:analyzer/file_system/memory_file_system.dart';
7 import 'mock_sdk.dart'; 7 import 'mock_sdk.dart';
8 import 'package:analyzer/src/generated/sdk.dart'; 8 import 'package:analyzer/src/generated/sdk.dart';
9 import 'package:analyzer/file_system/file_system.dart'; 9 import 'package:analyzer/file_system/file_system.dart';
10 import 'package:analyzer/src/generated/source.dart'; 10 import 'package:analyzer/src/generated/source.dart';
(...skipping 2101 matching lines...) Expand 10 before | Expand all | Expand 10 after
2112 typedef void AccessHandler(Expression node, AccessSemantics semantics); 2112 typedef void AccessHandler(Expression node, AccessSemantics semantics);
2113 2113
2114 /** 2114 /**
2115 * Visitor class used to run the tests. 2115 * Visitor class used to run the tests.
2116 */ 2116 */
2117 class TestVisitor extends RecursiveAstVisitor { 2117 class TestVisitor extends RecursiveAstVisitor {
2118 AccessHandler onAccess; 2118 AccessHandler onAccess;
2119 2119
2120 @override 2120 @override
2121 visitMethodInvocation(MethodInvocation node) { 2121 visitMethodInvocation(MethodInvocation node) {
2122 onAccess(node, classifyMethodInvocation(node)); 2122 onAccess(node, node.accept(ACCESS_SEMANTICS_VISITOR));
2123 } 2123 }
2124 2124
2125 @override 2125 @override
2126 visitPrefixedIdentifier(PrefixedIdentifier node) { 2126 visitPrefixedIdentifier(PrefixedIdentifier node) {
2127 onAccess(node, classifyPrefixedIdentifier(node)); 2127 onAccess(node, node.accept(ACCESS_SEMANTICS_VISITOR));
2128 } 2128 }
2129 2129
2130 @override 2130 @override
2131 visitPropertyAccess(PropertyAccess node) { 2131 visitPropertyAccess(PropertyAccess node) {
2132 onAccess(node, classifyPropertyAccess(node)); 2132 onAccess(node, node.accept(ACCESS_SEMANTICS_VISITOR));
2133 } 2133 }
2134 2134
2135 @override 2135 @override
2136 visitSimpleIdentifier(SimpleIdentifier node) { 2136 visitSimpleIdentifier(SimpleIdentifier node) {
2137 AccessSemantics semantics = classifySimpleIdentifier(node); 2137 AccessSemantics semantics = node.accept(ACCESS_SEMANTICS_VISITOR);
2138 if (semantics != null) { 2138 if (semantics != null) {
2139 onAccess(node, semantics); 2139 onAccess(node, semantics);
2140 } 2140 }
2141 } 2141 }
2142 } 2142 }
OLDNEW
« no previous file with comments | « pkg/analyzer2dart/test/end2end_data.dart ('k') | pkg/analyzer2dart/test/sexpr_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698