[cfe] Include (super)-initializing-formal modifier in ast-to-text

This adds the initializer-formal and super-initializer-formal modifiers to the ast-to-text output.

These flags are used by backends, so we should expect when these are present.

Triggered by discussion on https://github.com/dart-lang/sdk/issues/62645

TEST=existing

Change-Id: I3eec128c912249bc907931bcf01b52c0ec1eda62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/494080
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
Johnni Winther
2026-04-09 06:22:54 -07:00
committed by Commit Queue
parent ac4cf4f21b
commit 85991680ac
2327 changed files with 6244 additions and 6239 deletions
+5
View File
@@ -2787,6 +2787,11 @@ class Printer extends VisitorDefault<void> with VisitorVoidMixin {
writeModifier(node.isSynthesized && node.name != null, 'synthesized');
writeModifier(node.isHoisted, 'hoisted');
writeModifier(node.isWildcard, 'wildcard');
writeModifier(node.isInitializingFormal, 'initializing-formal');
writeModifier(
node.isSuperInitializingFormal,
'super-initializing-formal',
);
writeModifier(node.isErroneouslyInitialized, 'erroneously-initialized');
bool hasImplicitInitializer =
node.initializer is NullLiteral ||