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
|
|
|
}
|