Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 /// ----------------------------------------------------------------------- | 5 /// ----------------------------------------------------------------------- |
| 6 /// ERROR HANDLING | 6 /// ERROR HANDLING |
| 7 /// ----------------------------------------------------------------------- | 7 /// ----------------------------------------------------------------------- |
| 8 /// | 8 /// |
| 9 /// As a rule of thumb, errors that can be detected statically are handled by | 9 /// As a rule of thumb, errors that can be detected statically are handled by |
| 10 /// the frontend, typically by translating the erroneous code into a 'throw' or | 10 /// the frontend, typically by translating the erroneous code into a 'throw' or |
| (...skipping 2982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2993 | 2993 |
| 2994 /// Declaration of a local variable. | 2994 /// Declaration of a local variable. |
| 2995 /// | 2995 /// |
| 2996 /// This may occur as a statement, but is also used in several non-statement | 2996 /// This may occur as a statement, but is also used in several non-statement |
| 2997 /// contexts, such as in [ForStatement], [Catch], and [FunctionNode]. | 2997 /// contexts, such as in [ForStatement], [Catch], and [FunctionNode]. |
| 2998 /// | 2998 /// |
| 2999 /// When this occurs as a statement, it must be a direct child of a [Block]. | 2999 /// When this occurs as a statement, it must be a direct child of a [Block]. |
| 3000 // | 3000 // |
| 3001 // DESIGN TODO: Should we remove the 'final' modifier from variables? | 3001 // DESIGN TODO: Should we remove the 'final' modifier from variables? |
| 3002 class VariableDeclaration extends Statement { | 3002 class VariableDeclaration extends Statement { |
| 3003 /// Offset of the equals sign in the source file it comes from. | |
|
Kevin Millikin (Google)
2017/02/08 15:37:51
For dartdoc comments, I suggest following the styl
jensj
2017/02/13 14:04:15
Done.
| |
| 3004 /// Valid values are from 0 and up, or -1 ([TreeNode.noOffset]) | |
| 3005 /// if the equals sign offset is not available (e.g. if not initialized) | |
| 3006 /// (this is the default if none is specifically set). | |
| 3007 int fileEqualsOffset = TreeNode.noOffset; | |
| 3008 | |
| 3003 /// For named parameters, this is the name of the parameter. No two named | 3009 /// For named parameters, this is the name of the parameter. No two named |
| 3004 /// parameters (in the same parameter list) can have the same name. | 3010 /// parameters (in the same parameter list) can have the same name. |
| 3005 /// | 3011 /// |
| 3006 /// In all other cases, the name is cosmetic, may be empty or null, | 3012 /// In all other cases, the name is cosmetic, may be empty or null, |
| 3007 /// and is not necessarily unique. | 3013 /// and is not necessarily unique. |
| 3008 String name; | 3014 String name; |
| 3009 int flags = 0; | 3015 int flags = 0; |
| 3010 DartType type; // Not null, defaults to dynamic. | 3016 DartType type; // Not null, defaults to dynamic. |
| 3011 InferredValue inferredValue; // May be null. | 3017 InferredValue inferredValue; // May be null. |
| 3012 | 3018 |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3668 } | 3674 } |
| 3669 } | 3675 } |
| 3670 } | 3676 } |
| 3671 | 3677 |
| 3672 class Source { | 3678 class Source { |
| 3673 final List<int> lineStarts; | 3679 final List<int> lineStarts; |
| 3674 final String source; | 3680 final String source; |
| 3675 | 3681 |
| 3676 Source(this.lineStarts, this.source); | 3682 Source(this.lineStarts, this.source); |
| 3677 } | 3683 } |
| OLD | NEW |