forked from aspnet/AspNetWebStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSyntaxTreeNode.cs
More file actions
42 lines (35 loc) · 1.5 KB
/
Copy pathSyntaxTreeNode.cs
File metadata and controls
42 lines (35 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// 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; }
/// <summary>
/// Returns true if this element is a block (to avoid casting)
/// </summary>
public abstract bool IsBlock { get; }
/// <summary>
/// The length of all the content contained in this node
/// </summary>
public abstract int Length { get; }
/// <summary>
/// The start point of this node
/// </summary>
public abstract SourceLocation Start { get; }
/// <summary>
/// Accepts a parser visitor, calling the appropriate visit method and passing in this instance
/// </summary>
/// <param name="visitor">The visitor to accept</param>
public abstract void Accept(ParserVisitor visitor);
/// <summary>
/// Determines if the specified node is equivalent to this node
/// </summary>
/// <param name="node">The node to compare this node with</param>
/// <returns>
/// true if the provided node has all the same content and metadata, though the specific quantity and type of symbols may be different.
/// </returns>
public abstract bool EquivalentTo(SyntaxTreeNode node);
}
}