| OLD | NEW |
| 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 library analyzer2dart.semantic_visitor; | 5 library analyzer2dart.semantic_visitor; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer/src/generated/source.dart'; | 8 import 'package:analyzer/src/generated/source.dart'; |
| 9 | 9 |
| 10 import 'util.dart'; | 10 import 'util.dart'; |
| 11 import 'package:analyzer2dart/src/identifier_semantics.dart'; | 11 import 'identifier_semantics.dart'; |
| 12 | 12 |
| 13 /// An AST visitor which uses the [AccessSemantics] of invocations and accesses | 13 /// An AST visitor which uses the [AccessSemantics] of invocations and accesses |
| 14 /// to fine-grain visitor methods. | 14 /// to fine-grain visitor methods. |
| 15 abstract class SemanticVisitor<R> extends RecursiveAstVisitor<R> { | 15 abstract class SemanticVisitor<R> extends RecursiveAstVisitor<R> { |
| 16 | 16 |
| 17 Source get currentSource; | 17 Source get currentSource; |
| 18 | 18 |
| 19 void reportMessage(AstNode node, String message) { | 19 void reportMessage(AstNode node, String message) { |
| 20 reportSourceMessage(currentSource, node, message); | 20 reportSourceMessage(currentSource, node, message); |
| 21 } | 21 } |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 return visitStaticMethodAccess(node, semantics); | 168 return visitStaticMethodAccess(node, semantics); |
| 169 case AccessKind.STATIC_PROPERTY: | 169 case AccessKind.STATIC_PROPERTY: |
| 170 return visitStaticPropertyAccess(node, semantics); | 170 return visitStaticPropertyAccess(node, semantics); |
| 171 default: | 171 default: |
| 172 // Unexpected access kind. | 172 // Unexpected access kind. |
| 173 return giveUp(node, | 173 return giveUp(node, |
| 174 'Unexpected ${semantics} in _handlePropertyAccess.'); | 174 'Unexpected ${semantics} in _handlePropertyAccess.'); |
| 175 } | 175 } |
| 176 } | 176 } |
| 177 } | 177 } |
| OLD | NEW |