Show / Hide Table of Contents

Class AstNode

Base class for all AST nodes. Stores line number and provides an accept method for the visitor pattern.

Inheritance
object
AstNode
ExprNode
ProgramNode
StatementNode
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VM.Parser
Assembly: VM.dll
Syntax
public abstract class AstNode

Properties

Line

The line number in the source code where this node appears.

Declaration
public int Line { get; init; }
Property Value
Type Description
int

Methods

Accept<T>(IAstVisitor<T>)

Accepts a visitor that returns a value.

Declaration
public abstract T Accept<T>(IAstVisitor<T> visitor)
Parameters
Type Name Description
IAstVisitor<T> visitor
Returns
Type Description
T
Type Parameters
Name Description
T

ToString()

Returns a string representation of the AST node for debugging.

Declaration
public override abstract string ToString()
Returns
Type Description
string
Overrides
object.ToString()
In this article
Back to top Generated by DocFX