Skip to content

Commit bfc8faa

Browse files
scheglovCommit Queue
authored andcommitted
CodeGen. Document GenerateNodeProperty. #2
Change-Id: I1559e18a4f14a4bec999a1263de54e67d662ec86 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/431323 Reviewed-by: Paul Berry <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 525b67a commit bfc8faa

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

pkg/analyzer/lib/src/dart/ast/ast.dart

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12125,7 +12125,7 @@ class GenerateNodeImpl {
1212512125

1212612126
/// Description for a single property in the node implementation.
1212712127
///
12128-
/// Most of these description refer to properties of the public interface,
12128+
/// Most of these descriptions refer to properties of the public interface,
1212912129
/// e.g. `Foo` in `class FooImpl extends BarImpl implements Baz, Foo`.
1213012130
class GenerateNodeProperty {
1213112131
final String name;
@@ -12146,12 +12146,23 @@ class GenerateNodeProperty {
1214612146
/// Obviously, these are always paired with [isSuper].
1214712147
final bool superNullAssertOverride;
1214812148

12149-
/// Sometimes we use [Token.lexicallyFirst], and want to describe which
12150-
/// group of tokens to use.
12149+
/// If the parser can recover from tokens in a group of keyword tokens
12150+
/// being in wrong order, each keyword's property in the group should be
12151+
/// marked with the same non-null value for this field. The generated code
12152+
/// for [AstNode.beginToken] or
12153+
/// [AnnotatedNode.firstTokenAfterCommentAndMetadata] will use
12154+
/// [Token.lexicallyFirst] to identify which keyword in the group appears
12155+
/// first.
12156+
///
12157+
/// Only meaningful when applied to token properties; all properties with
12158+
/// the same [tokenGroupId] should appear consecutively in the
12159+
/// `childEntitiesOrder` list.
1215112160
final int? tokenGroupId;
1215212161

12153-
/// If the property does not exist in the public interface, we still need
12154-
/// to know its type.
12162+
/// The type of the property.
12163+
///
12164+
/// If the property is declared in the public API, this doesn't need to be
12165+
/// specified (because it can be inferred from the public API declaration).
1215512166
final Type? type;
1215612167

1215712168
const GenerateNodeProperty(

0 commit comments

Comments
 (0)