jackfiled
cf19f8197e
Reviewed-on: https://git.bupt-hpc.cn/jackfiled/CanonSharp/pulls/3 Co-authored-by: jackfiled <xcrenchangjun@outlook.com> Co-committed-by: jackfiled <xcrenchangjun@outlook.com>
24 lines
577 B
C#
24 lines
577 B
C#
using CanonSharp.Pascal.Scanner;
|
|
|
|
namespace CanonSharp.Pascal.SyntaxTree;
|
|
|
|
public sealed class VariableNode : SyntaxNodeBase
|
|
{
|
|
public override SyntaxNodeType NodeType => SyntaxNodeType.Variable;
|
|
|
|
public LexicalToken Identifier { get; }
|
|
|
|
public List<SyntaxNodeBase> Indexers { get; } = [];
|
|
|
|
public VariableNode(LexicalToken identifier)
|
|
{
|
|
Identifier = identifier;
|
|
}
|
|
|
|
public VariableNode(LexicalToken identifier, IEnumerable<SyntaxNodeBase> expressions)
|
|
{
|
|
Identifier = identifier;
|
|
Indexers.AddRange(expressions);
|
|
}
|
|
}
|