Skip to content

Commit cddd21d

Browse files
johnniwinthercommit-bot@chromium.org
authored andcommitted
[cfe] Merge ExpressionGenerator into Generator
+ Make more internal properties private + Add documentation on more properties/methods Change-Id: I40779c83fcb7f888e485ccbc7b1fad312199806c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109710 Reviewed-by: Dan Rubel <[email protected]> Commit-Queue: Johnni Winther <[email protected]>
1 parent b52328e commit cddd21d

File tree

2 files changed

+381
-398
lines changed

2 files changed

+381
-398
lines changed

pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3740,7 +3740,7 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
37403740
buildProblem(message.messageObject, nameToken.charOffset,
37413741
nameToken.lexeme.length));
37423742
} else {
3743-
errorName = debugName(getNodeName(type), name);
3743+
errorName = debugName(type.fullNameForErrors, name);
37443744
}
37453745
errorName ??= name;
37463746

@@ -5693,15 +5693,13 @@ String debugName(String className, String name, [String prefix]) {
56935693
return prefix == null ? result : "$prefix.result";
56945694
}
56955695

5696+
// TODO(johnniwinther): This is a bit ad hoc. Call sites should know what kind
5697+
// of objects can be anticipated and handle these directly.
56965698
String getNodeName(Object node) {
56975699
if (node is Identifier) {
56985700
return node.name;
56995701
} else if (node is Declaration) {
57005702
return node.fullNameForErrors;
5701-
} else if (node is ThisAccessGenerator) {
5702-
return node.isSuper ? "super" : "this";
5703-
} else if (node is Generator) {
5704-
return node.plainNameForRead;
57055703
} else if (node is QualifiedName) {
57065704
return flattenName(node, node.charOffset, null);
57075705
} else {

0 commit comments

Comments
 (0)