platform/lib/src/language/ast/argument.dart
2017-01-22 18:15:53 -05:00

18 lines
494 B
Dart

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()}';
}