progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
31
AspClassic.Parser/Modifier.cs
Normal file
31
AspClassic.Parser/Modifier.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for a declaration modifier.
|
||||
/// </summary>
|
||||
public sealed class Modifier : Tree
|
||||
{
|
||||
private readonly ModifierTypes _ModifierType;
|
||||
|
||||
/// <summary>
|
||||
/// The type of the modifier.
|
||||
/// </summary>
|
||||
public ModifierTypes ModifierType => _ModifierType;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new modifier parse tree.
|
||||
/// </summary>
|
||||
/// <param name="modifierType">The type of the modifier.</param>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
public Modifier(ModifierTypes modifierType, Span span)
|
||||
: base(TreeType.Modifier, span)
|
||||
{
|
||||
if ((modifierType & checked(modifierType - 1)) != 0 || modifierType < ModifierTypes.None || modifierType > ModifierTypes.Narrowing)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("modifierType");
|
||||
}
|
||||
_ModifierType = modifierType;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue