pedantic: var def
This commit is contained in:
parent
7f28d673e6
commit
b245dde4fb
2 changed files with 15 additions and 2 deletions
|
@ -5,15 +5,27 @@ import 'package:source_span/source_span.dart';
|
|||
import 'type.dart';
|
||||
import 'variable.dart';
|
||||
|
||||
/// A single variable definition.
|
||||
class VariableDefinitionContext extends Node {
|
||||
final Token COLON;
|
||||
/// The source token.
|
||||
final Token colonToken;
|
||||
|
||||
/// The declared variable.
|
||||
final VariableContext variable;
|
||||
|
||||
/// The type of the variable.
|
||||
final TypeContext type;
|
||||
|
||||
/// The default value of the variable.
|
||||
final DefaultValueContext defaultValue;
|
||||
|
||||
VariableDefinitionContext(this.variable, this.COLON, this.type,
|
||||
VariableDefinitionContext(this.variable, this.colonToken, this.type,
|
||||
[this.defaultValue]);
|
||||
|
||||
/// Use [colonToken] instead.
|
||||
@deprecated
|
||||
Token get COLON => colonToken;
|
||||
|
||||
@override
|
||||
FileSpan get span => variable.span.expand(defaultValue?.span ?? type.span);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'variable_definition.dart';
|
|||
|
||||
/// A set of variable definitions in a GraphQL operation.
|
||||
class VariableDefinitionsContext extends Node {
|
||||
/// The source tokens.
|
||||
final Token lParenToken, rParenToken;
|
||||
|
||||
/// The variables defined in this node.
|
||||
|
|
Loading…
Reference in a new issue