From 6db464c7393bf938c85a451c28445fec8f1223db Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Wed, 29 Oct 2025 12:06:31 -0700 Subject: [PATCH] add a comment to lib/src/display.dart --- pkgs/jot/lib/src/display.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/jot/lib/src/display.dart b/pkgs/jot/lib/src/display.dart index f1af5343..766bb118 100644 --- a/pkgs/jot/lib/src/display.dart +++ b/pkgs/jot/lib/src/display.dart @@ -4,6 +4,15 @@ // ignore_for_file: implementation_imports +// Note: This file was copied from package:analyzer's +// `lib/src/dart/element/display_string_builder.dart` file and adopted to +// make the output correct from the POV of dart format. It will need to be +// updated periodically from the upstream source-of-truth. +// +// We use this file to generate reasonable looking source code from Elements +// - something that looks like what the user might have written - which we then +// normalize via dart format. + import 'package:analyzer/dart/element/element.dart'; import 'package:analyzer/dart/element/nullability_suffix.dart'; import 'package:analyzer/dart/element/type.dart';