27 lines
699 B
C#
27 lines
699 B
C#
namespace AspClassic.Parser;
|
|
|
|
/// <summary>
|
|
/// A parse tree for a Boolean literal expression.
|
|
/// </summary>
|
|
public sealed class BooleanLiteralExpression : LiteralExpression
|
|
{
|
|
private readonly bool _Literal;
|
|
|
|
/// <summary>
|
|
/// The literal value.
|
|
/// </summary>
|
|
public bool Literal => _Literal;
|
|
|
|
public override object Value => _Literal;
|
|
|
|
/// <summary>
|
|
/// Constructs a new parse tree for a Boolean literal expression.
|
|
/// </summary>
|
|
/// <param name="literal">The literal value.</param>
|
|
/// <param name="span">The location of the parse tree.</param>
|
|
public BooleanLiteralExpression(bool literal, Span span)
|
|
: base(TreeType.BooleanLiteralExpression, span)
|
|
{
|
|
_Literal = literal;
|
|
}
|
|
}
|