pedantic: type_name

This commit is contained in:
Tobe O 2019-08-07 23:18:14 -04:00
parent b245dde4fb
commit cba6d7840d

View file

@ -2,13 +2,20 @@ import 'node.dart';
import 'package:source_span/source_span.dart';
import '../token.dart';
/// The name of a GraphQL type.
class TypeNameContext extends Node {
final Token NAME;
/// The source token.
final Token nameToken;
String get name => NAME.text;
TypeNameContext(this.nameToken);
/// Use [nameToken] instead.
@deprecated
Token get NAME => nameToken;
/// The [String] value of the [nameToken].
String get name => nameToken.text;
@override
FileSpan get span => NAME.span;
TypeNameContext(this.NAME);
FileSpan get span => nameToken.span;
}