2016-05-25 05:01:43 +02:00
|
|
|
// Copyright 2016 Google Inc. Use of this source code is governed by an
|
|
|
|
// MIT-style license that can be found in the LICENSE file or at
|
|
|
|
// https://opensource.org/licenses/MIT.
|
|
|
|
|
2016-05-28 01:09:03 +02:00
|
|
|
import '../visitor/value.dart';
|
2016-05-25 05:01:43 +02:00
|
|
|
import '../value.dart';
|
|
|
|
|
2016-06-04 01:31:29 +02:00
|
|
|
const sassTrue = const SassBoolean._(true);
|
|
|
|
const sassFalse = const SassBoolean._(false);
|
2016-05-25 05:01:43 +02:00
|
|
|
|
2016-06-04 01:31:29 +02:00
|
|
|
class SassBoolean extends Value {
|
2016-05-25 05:01:43 +02:00
|
|
|
final bool value;
|
|
|
|
|
2016-06-04 01:31:29 +02:00
|
|
|
factory SassBoolean(bool value) => value ? sassTrue : sassFalse;
|
2016-05-25 05:01:43 +02:00
|
|
|
|
2016-06-04 01:31:29 +02:00
|
|
|
const SassBoolean._(this.value);
|
2016-05-25 05:01:43 +02:00
|
|
|
|
2016-05-28 01:09:03 +02:00
|
|
|
/*=T*/ accept/*<T>*/(ValueVisitor/*<T>*/ visitor) =>
|
|
|
|
visitor.visitBoolean(this);
|
|
|
|
|
2016-05-25 05:01:43 +02:00
|
|
|
Value unaryNot() => value ? sassFalse : sassTrue;
|
|
|
|
}
|