using Canon.Core.Abstractions;
using Canon.Core.Enums;
using Canon.Core.LexicalParser;
namespace Canon.Core.SyntaxNodes;
public class ValueParameter : NonTerminatedSyntaxNode
{
public override NonTerminatorType Type => NonTerminatorType.ValueParameter;
///
/// 是否为参数中的引用参数
///
public bool IsReference { get; set; }
public IdentifierSemanticToken Token =>
Children[0].Convert().Token.Convert();
public IdentifierList IdentifierList => Children[1].Convert();
public override void PreVisit(SyntaxNodeVisitor visitor)
{
visitor.PreVisit(this);
}
public override void PostVisit(SyntaxNodeVisitor visitor)
{
visitor.PostVisit(this);
}
public static ValueParameter Create(List children)
{
return new ValueParameter { Children = children };
}
}