Skip to content

Commit 2db4948

Browse files
scheglovCommit Queue
authored andcommitted
CodeGen. Generate members of most leaf AstNodeImpl classes.
Every declaration annotated with `@generated` was generated. In the current version there are `2180` such declarations. For comparison, there are `2167` instances of `@override` in total, and `@generated + @override` has `1576` instances, so we generate `72%` of all overrides. The generator automatically formats and sorts `ast.dart` after applying changes, so the result is nice and clean. We run a separate DAS instance from the script to do this. Things to improve in the future: 1. Generate for non-leaf classes. 2. Support for `DoNotGenerate`. Change-Id: I05e6356c9aac68449d5117ad8fd533735f130c73 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427481 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Paul Berry <[email protected]>
1 parent e5a9b59 commit 2db4948

22 files changed

+8632
-2585
lines changed

pkg/analysis_server/lib/src/computer/computer_highlights.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,6 @@ class _DartUnitHighlightsComputerVisitor extends RecursiveAstVisitor<void> {
912912
@override
913913
void visitConstructorSelector(ConstructorSelector node) {
914914
computer._addRegion_node(node.name, HighlightRegionType.CONSTRUCTOR);
915-
node.visitChildren(this);
916915
}
917916

918917
@override

0 commit comments

Comments
 (0)