platform/lib/src/language/ast/argument.dart

19 lines
494 B
Dart
Raw Normal View History

2017-01-22 23:15:53 +00:00
import '../token.dart';
import 'node.dart';
import 'package:source_span/src/span.dart';
import 'value_or_variable.dart';
class ArgumentContext extends Node {
final Token NAME, COLON;
final ValueOrVariableContext valueOrVariable;
ArgumentContext(this.NAME, this.COLON, this.valueOrVariable);
@override
SourceSpan get span =>
new SourceSpan(NAME.span?.start, valueOrVariable.end, toSource());
@override
String toSource() => '${NAME.text}:${valueOrVariable.toSource()}';
}