VariableContext extends input value

This commit is contained in:
Tobe O 2019-08-07 21:53:45 -04:00
parent 1988b401a0
commit ca21215016

View file

@ -1,8 +1,8 @@
import '../token.dart';
import 'node.dart';
import 'package:source_span/source_span.dart';
import '../token.dart';
import 'input_value.dart';
class VariableContext extends Node {
class VariableContext extends InputValueContext<Object> {
final Token DOLLAR, NAME;
VariableContext(this.DOLLAR, this.NAME);
@ -12,6 +12,7 @@ class VariableContext extends Node {
@override
FileSpan get span => DOLLAR.span.expand(NAME.span);
@override
Object computeValue(Map<String, dynamic> variables) => variables[name];
// new FileSpan(DOLLAR?.span?.start, NAME?.span?.end, toSource());
}