2017-01-22 23:15:53 +00:00
|
|
|
import '../token.dart';
|
|
|
|
import 'package:source_span/src/span.dart';
|
|
|
|
import 'value.dart';
|
|
|
|
|
|
|
|
class BooleanValueContext extends ValueContext {
|
|
|
|
final Token BOOLEAN;
|
|
|
|
|
2017-01-25 04:28:09 +00:00
|
|
|
BooleanValueContext(this.BOOLEAN) {
|
|
|
|
assert(BOOLEAN?.text == 'true' || BOOLEAN?.text == 'false');
|
|
|
|
}
|
|
|
|
|
|
|
|
bool get booleanValue => BOOLEAN.text == 'true';
|
2017-01-22 23:15:53 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
SourceSpan get span => BOOLEAN.span;
|
|
|
|
|
|
|
|
@override
|
|
|
|
String toSource() => BOOLEAN.text;
|
|
|
|
}
|