@@ -34,6 +34,7 @@ import 'package:analyzer_plugin/protocol/protocol_common.dart' show Location;
3434import 'package:over_react_analyzer_plugin/src/diagnostic/analyzer_debug_helper.dart' ;
3535import 'package:over_react_analyzer_plugin/src/diagnostic_contributor.dart' ;
3636import 'package:over_react_analyzer_plugin/src/indent_util.dart' ;
37+ import 'package:over_react_analyzer_plugin/src/over_react_builder_parsing.dart' show TypeNameHelper;
3738import 'package:over_react_analyzer_plugin/src/util/ast_util.dart' ;
3839import 'package:over_react_analyzer_plugin/src/util/function_components.dart' ;
3940import 'package:over_react_analyzer_plugin/src/util/pretty_print.dart' ;
@@ -2365,20 +2366,3 @@ extension<E extends Comparable<dynamic>> on Iterable<E> {
23652366 return true ;
23662367 }
23672368}
2368-
2369- extension TypeNameHelper on NamedType {
2370- // Backwards compatibility for various analyzer versions that remove name/name2.
2371- // ignore: unnecessary_this
2372- dynamic get name => this .name2; // Use `this.` to point to real impl if it exists, not extension.
2373- // ignore: unnecessary_this
2374- dynamic get name2 => this .name; // Use `this.` to point to real impl if it exists, not extension.
2375- dynamic get _name => name;
2376-
2377- String get nameLexeme {
2378- final dynamic name = _name;
2379- if (name is Identifier ) return name.name;
2380- if (name is Token ) return name.lexeme;
2381- if (name is String ) return name;
2382- throw UnimplementedError ('Unexpected type for name: ${name .runtimeType }' );
2383- }
2384- }
0 commit comments