| 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 analyzer.src.generated.error_verifier; | 5 library analyzer.src.generated.error_verifier; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import "dart:math" as math; | 8 import "dart:math" as math; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 2607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2618 * Verify that the given [identifier] is not a keyword, and generates the | 2618 * Verify that the given [identifier] is not a keyword, and generates the |
| 2619 * given [errorCode] on the identifier if it is a keyword. | 2619 * given [errorCode] on the identifier if it is a keyword. |
| 2620 * | 2620 * |
| 2621 * See [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME], | 2621 * See [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME], |
| 2622 * [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME], and | 2622 * [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME], and |
| 2623 * [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]. | 2623 * [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]. |
| 2624 */ | 2624 */ |
| 2625 void _checkForBuiltInIdentifierAsName( | 2625 void _checkForBuiltInIdentifierAsName( |
| 2626 SimpleIdentifier identifier, ErrorCode errorCode) { | 2626 SimpleIdentifier identifier, ErrorCode errorCode) { |
| 2627 Token token = identifier.token; | 2627 Token token = identifier.token; |
| 2628 if (token.type == TokenType.KEYWORD && token.keyword?.isPseudo != true) { | 2628 if (token.type.isKeyword && token.keyword?.isPseudo != true) { |
| 2629 _errorReporter | 2629 _errorReporter |
| 2630 .reportErrorForNode(errorCode, identifier, [identifier.name]); | 2630 .reportErrorForNode(errorCode, identifier, [identifier.name]); |
| 2631 } | 2631 } |
| 2632 } | 2632 } |
| 2633 | 2633 |
| 2634 /** | 2634 /** |
| 2635 * Verify that the given [switchCase] is terminated with 'break', 'continue', | 2635 * Verify that the given [switchCase] is terminated with 'break', 'continue', |
| 2636 * 'return' or 'throw'. | 2636 * 'return' or 'throw'. |
| 2637 * | 2637 * |
| 2638 * see [StaticWarningCode.CASE_BLOCK_NOT_TERMINATED]. | 2638 * see [StaticWarningCode.CASE_BLOCK_NOT_TERMINATED]. |
| (...skipping 4490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7129 class _InvocationCollector extends RecursiveAstVisitor { | 7129 class _InvocationCollector extends RecursiveAstVisitor { |
| 7130 final List<String> superCalls = <String>[]; | 7130 final List<String> superCalls = <String>[]; |
| 7131 | 7131 |
| 7132 @override | 7132 @override |
| 7133 visitMethodInvocation(MethodInvocation node) { | 7133 visitMethodInvocation(MethodInvocation node) { |
| 7134 if (node.target is SuperExpression) { | 7134 if (node.target is SuperExpression) { |
| 7135 superCalls.add(node.methodName.name); | 7135 superCalls.add(node.methodName.name); |
| 7136 } | 7136 } |
| 7137 } | 7137 } |
| 7138 } | 7138 } |
| OLD | NEW |