progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
68
AspClassic.Parser/SetAccessorDeclaration.cs
Normal file
68
AspClassic.Parser/SetAccessorDeclaration.cs
Normal file
|
@ -0,0 +1,68 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for a Set property accessor.
|
||||
/// </summary>
|
||||
public sealed class SetAccessorDeclaration : ModifiedDeclaration
|
||||
{
|
||||
private readonly Location _SetLocation;
|
||||
|
||||
private readonly ParameterCollection _Parameters;
|
||||
|
||||
private readonly StatementCollection _Statements;
|
||||
|
||||
private readonly EndBlockDeclaration _EndDeclaration;
|
||||
|
||||
/// <summary>
|
||||
/// The location of the 'Set'.
|
||||
/// </summary>
|
||||
public Location SetLocation => _SetLocation;
|
||||
|
||||
/// <summary>
|
||||
/// The accessor's parameters.
|
||||
/// </summary>
|
||||
public ParameterCollection Parameters => _Parameters;
|
||||
|
||||
/// <summary>
|
||||
/// The statements in the accessor.
|
||||
/// </summary>
|
||||
public StatementCollection Statements => _Statements;
|
||||
|
||||
/// <summary>
|
||||
/// The End declaration for the accessor.
|
||||
/// </summary>
|
||||
public EndBlockDeclaration EndDeclaration => _EndDeclaration;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new parse tree for a property accessor.
|
||||
/// </summary>
|
||||
/// <param name="attributes">The attributes for the parse tree.</param>
|
||||
/// <param name="modifiers">The modifiers for the parse tree.</param>
|
||||
/// <param name="setLocation">The location of the 'Set'.</param>
|
||||
/// <param name="parameters">The parameters of the declaration.</param>
|
||||
/// <param name="statements">The statements in the declaration.</param>
|
||||
/// <param name="endDeclaration">The end block declaration, if any.</param>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
/// <param name="comments">The comments for the parse tree.</param>
|
||||
public SetAccessorDeclaration(AttributeBlockCollection attributes, ModifierCollection modifiers, Location setLocation, ParameterCollection parameters, StatementCollection statements, EndBlockDeclaration endDeclaration, Span span, IList<Comment> comments)
|
||||
: base(TreeType.SetAccessorDeclaration, attributes, modifiers, span, comments)
|
||||
{
|
||||
SetParent(parameters);
|
||||
SetParent(statements);
|
||||
SetParent(endDeclaration);
|
||||
_Parameters = parameters;
|
||||
_SetLocation = setLocation;
|
||||
_Statements = statements;
|
||||
_EndDeclaration = endDeclaration;
|
||||
}
|
||||
|
||||
protected override void GetChildTrees(IList<Tree> childList)
|
||||
{
|
||||
base.GetChildTrees(childList);
|
||||
Tree.AddChild(childList, Parameters);
|
||||
Tree.AddChild(childList, Statements);
|
||||
Tree.AddChild(childList, EndDeclaration);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue