progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
55
AspClassic.Parser/UsingBlockStatement.cs
Normal file
55
AspClassic.Parser/UsingBlockStatement.cs
Normal file
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for a Using block statement.
|
||||
/// </summary>
|
||||
public sealed class UsingBlockStatement : ExpressionBlockStatement
|
||||
{
|
||||
private readonly VariableDeclaratorCollection _VariableDeclarators;
|
||||
|
||||
/// <summary>
|
||||
/// The variable declarators, if no expression.
|
||||
/// </summary>
|
||||
public VariableDeclaratorCollection VariableDeclarators => _VariableDeclarators;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new parse tree for a Using statement block with an expression.
|
||||
/// </summary>
|
||||
/// <param name="expression">The expression.</param>
|
||||
/// <param name="statements">The statements in the block.</param>
|
||||
/// <param name="endStatement">The End statement for the block, if any.</param>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
/// <param name="comments">The comments for the parse tree.</param>
|
||||
public UsingBlockStatement(Expression expression, StatementCollection statements, EndBlockStatement endStatement, Span span, IList<Comment> comments)
|
||||
: base(TreeType.UsingBlockStatement, expression, statements, endStatement, span, comments)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new parse tree for a Using statement block with variable declarators.
|
||||
/// </summary>
|
||||
/// <param name="variableDeclarators">The variable declarators.</param>
|
||||
/// <param name="statements">The statements in the block.</param>
|
||||
/// <param name="endStatement">The End statement for the block, if any.</param>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
/// <param name="comments">The comments for the parse tree.</param>
|
||||
public UsingBlockStatement(VariableDeclaratorCollection variableDeclarators, StatementCollection statements, EndBlockStatement endStatement, Span span, IList<Comment> comments)
|
||||
: base(TreeType.UsingBlockStatement, null, statements, endStatement, span, comments)
|
||||
{
|
||||
if (variableDeclarators == null)
|
||||
{
|
||||
throw new ArgumentNullException("variableDeclarators");
|
||||
}
|
||||
SetParent(variableDeclarators);
|
||||
_VariableDeclarators = variableDeclarators;
|
||||
}
|
||||
|
||||
protected override void GetChildTrees(IList<Tree> childList)
|
||||
{
|
||||
Tree.AddChild(childList, VariableDeclarators);
|
||||
base.GetChildTrees(childList);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue