mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-10 14:58:38 +01:00
21 lines
563 B
Dart
21 lines
563 B
Dart
|
// 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.
|
||
|
|
||
|
import '../value.dart';
|
||
|
|
||
|
class Boolean extends Value {
|
||
|
static const sassTrue = const Boolean._(true);
|
||
|
static const sassFalse = const Boolean._(false);
|
||
|
|
||
|
final bool value;
|
||
|
|
||
|
factory Boolean(bool value) => value ? Boolean.sassTrue : Boolean.sassFalse;
|
||
|
|
||
|
const Boolean._(this.value);
|
||
|
|
||
|
Value unaryNot() => value ? sassFalse : sassTrue;
|
||
|
|
||
|
String toString() => value.toString();
|
||
|
}
|