// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Web.Razor.Text; namespace System.Web.Razor.Parser.SyntaxTree { public abstract class SyntaxTreeNode { public Block Parent { get; internal set; } /// /// Returns true if this element is a block (to avoid casting) /// public abstract bool IsBlock { get; } /// /// The length of all the content contained in this node /// public abstract int Length { get; } /// /// The start point of this node /// public abstract SourceLocation Start { get; } /// /// Accepts a parser visitor, calling the appropriate visit method and passing in this instance /// /// The visitor to accept public abstract void Accept(ParserVisitor visitor); /// /// Determines if the specified node is equivalent to this node /// /// The node to compare this node with /// /// true if the provided node has all the same content and metadata, though the specific quantity and type of symbols may be different. /// public abstract bool EquivalentTo(SyntaxTreeNode node); } }