platform/graphql_parser/lib/src/language/ast/variable_definitions.dart

19 lines
505 B
Dart
Raw Normal View History

2017-01-22 23:15:53 +00:00
import '../token.dart';
import 'node.dart';
2017-07-05 22:44:13 +00:00
import 'package:source_span/source_span.dart';
2017-01-22 23:15:53 +00:00
import 'variable_definition.dart';
class VariableDefinitionsContext extends Node {
final Token LPAREN, RPAREN;
final List<VariableDefinitionContext> variableDefinitions = [];
VariableDefinitionsContext(this.LPAREN, this.RPAREN);
@override
2017-07-05 22:44:13 +00:00
FileSpan get span {
var out = variableDefinitions.fold<FileSpan>(
LPAREN.span, (o, v) => o.expand(v.span));
return out.expand(RPAREN.span);
}
2017-01-22 23:15:53 +00:00
}