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