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

Side by Side Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 2156003004: Add an UNDEFINED_IDENTIFIER_AWAIT warning (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
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 library analyzer.src.generated.error; 5 library analyzer.src.generated.error;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart' show AstNode; 9 import 'package:analyzer/dart/ast/ast.dart' show AstNode;
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 5742 matching lines...) Expand 10 before | Expand all | Expand 10 after
5753 * initializer and there is no declaration <i>d</i> with name <i>id</i> in the 5753 * initializer and there is no declaration <i>d</i> with name <i>id</i> in the
5754 * lexical scope enclosing the expression. 5754 * lexical scope enclosing the expression.
5755 * 5755 *
5756 * Parameters: 5756 * Parameters:
5757 * 0: the name of the identifier 5757 * 0: the name of the identifier
5758 */ 5758 */
5759 static const StaticWarningCode UNDEFINED_IDENTIFIER = 5759 static const StaticWarningCode UNDEFINED_IDENTIFIER =
5760 const StaticWarningCode('UNDEFINED_IDENTIFIER', "Undefined name '{0}'"); 5760 const StaticWarningCode('UNDEFINED_IDENTIFIER', "Undefined name '{0}'");
5761 5761
5762 /** 5762 /**
5763 * If the identifer is 'await', be helpful about it.
5764 */
5765 static const StaticWarningCode UNDEFINED_IDENTIFIER_AWAIT =
5766 const StaticWarningCode('UNDEFINED_IDENTIFIER_AWAIT',
5767 "Undefined name 'await'; did you mean to add the 'async' marker to '{0 }'?");
5768
5769 /**
5763 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, 5770 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
5764 * <i>1<=i<=l</i>, must have a corresponding named parameter in the set 5771 * <i>1<=i<=l</i>, must have a corresponding named parameter in the set
5765 * {<i>p<sub>n+1</sub></i> &hellip; <i>p<sub>n+k</sub></i>} or a static 5772 * {<i>p<sub>n+1</sub></i> &hellip; <i>p<sub>n+k</sub></i>} or a static
5766 * warning occurs. 5773 * warning occurs.
5767 * 5774 *
5768 * Parameters: 5775 * Parameters:
5769 * 0: the name of the requested named parameter 5776 * 0: the name of the requested named parameter
5770 */ 5777 */
5771 static const StaticWarningCode UNDEFINED_NAMED_PARAMETER = 5778 static const StaticWarningCode UNDEFINED_NAMED_PARAMETER =
5772 const StaticWarningCode('UNDEFINED_NAMED_PARAMETER', 5779 const StaticWarningCode('UNDEFINED_NAMED_PARAMETER',
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
6090 * Initialize a newly created error code to have the given [name]. 6097 * Initialize a newly created error code to have the given [name].
6091 */ 6098 */
6092 const TodoCode(String name) : super(name, "{0}"); 6099 const TodoCode(String name) : super(name, "{0}");
6093 6100
6094 @override 6101 @override
6095 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 6102 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
6096 6103
6097 @override 6104 @override
6098 ErrorType get type => ErrorType.TODO; 6105 ErrorType get type => ErrorType.TODO;
6099 } 6106 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | pkg/analyzer/test/generated/static_warning_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698