This commit is contained in:
Jelle Luteijn 2022-05-15 11:19:49 +02:00
parent 16e76d6b31
commit 484dbfc9d9
529 changed files with 113694 additions and 0 deletions

View file

@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
namespace AspClassic.Parser;
/// <summary>
/// A parse tree for a RaiseEvent statement.
/// </summary>
public sealed class RaiseEventStatement : Statement
{
private readonly SimpleName _Name;
private readonly ArgumentCollection _Arguments;
/// <summary>
/// The name of the event to raise.
/// </summary>
public SimpleName Name => _Name;
/// <summary>
/// The arguments to the event.
/// </summary>
public ArgumentCollection Arguments => _Arguments;
/// <summary>
/// Constructs a new parse tree for a RaiseEvents statement.
/// </summary>
/// <param name="name">The name of the event to raise.</param>
/// <param name="arguments">The arguments to the event.</param>
/// <param name="span">The location of the parse tree.</param>
/// <param name="comments">The comments for the parse tree.</param>
public RaiseEventStatement(SimpleName name, ArgumentCollection arguments, Span span, IList<Comment> comments)
: base(TreeType.RaiseEventStatement, span, comments)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
SetParent(name);
SetParent(arguments);
_Name = name;
_Arguments = arguments;
}
protected override void GetChildTrees(IList<Tree> childList)
{
Tree.AddChild(childList, Name);
Tree.AddChild(childList, Arguments);
}
}