From 5f178c4a13328d2a8a4fea6418e9ef2f8eb6fbcd Mon Sep 17 00:00:00 2001 From: Tobe O Date: Wed, 7 Aug 2019 22:33:11 -0400 Subject: [PATCH] pedantic: ast/array_value.dart --- .../lib/src/language/ast/array_value.dart | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/graphql_parser/lib/src/language/ast/array_value.dart b/graphql_parser/lib/src/language/ast/array_value.dart index 1408a5bd..4e7204f3 100644 --- a/graphql_parser/lib/src/language/ast/array_value.dart +++ b/graphql_parser/lib/src/language/ast/array_value.dart @@ -2,16 +2,28 @@ import 'package:source_span/source_span.dart'; import '../token.dart'; import 'input_value.dart'; +/// A GraphQL list value literal. class ListValueContext extends InputValueContext { - final Token LBRACKET, RBRACKET; + /// The source tokens. + final Token lBracket, rBracket; + + /// The child values. final List values = []; - ListValueContext(this.LBRACKET, this.RBRACKET); + ListValueContext(this.lBracket, this.rBracket); + + /// Use [lBracket] instead. + @deprecated + Token get LBRACKET => lBracket; + + /// Use [rBracket] instead. + @deprecated + Token get RBRACKET => rBracket; @override FileSpan get span { - var out = values.fold(LBRACKET.span, (o, v) => o.expand(v.span)); - return out.expand(RBRACKET.span); + var out = values.fold(lBracket.span, (o, v) => o.expand(v.span)); + return out.expand(rBracket.span); } @override