progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
48
AspClassic.Parser/ElseIfStatement.cs
Normal file
48
AspClassic.Parser/ElseIfStatement.cs
Normal file
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for an Else If statement.
|
||||
/// </summary>
|
||||
public sealed class ElseIfStatement : Statement
|
||||
{
|
||||
private readonly Expression _Expression;
|
||||
|
||||
private readonly Location _ThenLocation;
|
||||
|
||||
/// <summary>
|
||||
/// The conditional expression.
|
||||
/// </summary>
|
||||
public Expression Expression => _Expression;
|
||||
|
||||
/// <summary>
|
||||
/// The location of the 'Then', if any.
|
||||
/// </summary>
|
||||
public Location ThenLocation => _ThenLocation;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new parse tree for an Else If statement.
|
||||
/// </summary>
|
||||
/// <param name="expression">The conditional expression.</param>
|
||||
/// <param name="thenLocation">The location of the 'Then', if any.</param>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
/// <param name="comments">The comments for the parse tree.</param>
|
||||
public ElseIfStatement(Expression expression, Location thenLocation, Span span, IList<Comment> comments)
|
||||
: base(TreeType.ElseIfStatement, span, comments)
|
||||
{
|
||||
if (expression == null)
|
||||
{
|
||||
throw new ArgumentNullException("expression");
|
||||
}
|
||||
SetParent(expression);
|
||||
_Expression = expression;
|
||||
_ThenLocation = thenLocation;
|
||||
}
|
||||
|
||||
protected override void GetChildTrees(IList<Tree> childList)
|
||||
{
|
||||
Tree.AddChild(childList, Expression);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue