pedantic: type_name
This commit is contained in:
parent
b245dde4fb
commit
cba6d7840d
1 changed files with 12 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue