| | | 1 | | namespace NanoCLang.Entities { |
| | | 2 | | /// <summary> |
| | | 3 | | /// Provides a class for boolean literal constants. |
| | | 4 | | /// </summary> |
| | | 5 | | public class BooleanConstant : IntegerConstant { |
| | | 6 | | /// <summary> |
| | | 7 | | /// Creates a new boolean constant with the given <paramref name="value"/>. |
| | | 8 | | /// </summary> |
| | | 9 | | /// <param name="value">Value of the literal.</param> |
| | 15 | 10 | | public BooleanConstant(bool value) : base(value ? 1 : 0, 1) { } |
| | | 11 | | /// <inheritdoc/> |
| | 0 | 12 | | public override object Clone() => new BooleanConstant(Value != 0); |
| | | 13 | | } |
| | | 14 | | } |