MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
Loading...
Searching...
No Matches
mxvm::ProgramNode Class Reference

Root AST node representing an entire program or object. More...

#include <ast.hpp>

Inheritance diagram for mxvm::ProgramNode:

Public Member Functions

void addSection (std::unique_ptr< SectionNode > section)
void addInlineObject (std::unique_ptr< ProgramNode > obj)
virtual void accept (ASTVisitor &visitor) override
virtual std::string toString () const override
Public Member Functions inherited from mxvm::ASTNode
virtual ~ASTNode ()=default

Public Attributes

std::string name
bool object = false
 true if this node represents an object rather than a program
std::string root_name
std::vector< std::unique_ptr< SectionNode > > sections
std::vector< std::unique_ptr< ProgramNode > > inlineObjects

Detailed Description

Root AST node representing an entire program or object.

Definition at line 50 of file ast.hpp.

Member Function Documentation

◆ accept()

void mxvm::ProgramNode::accept ( ASTVisitor & visitor)
overridevirtual

Implements mxvm::ASTNode.

Definition at line 12 of file ast.cpp.

References mxvm::ASTVisitor::visit().

◆ addInlineObject()

void mxvm::ProgramNode::addInlineObject ( std::unique_ptr< ProgramNode > obj)
inline

Definition at line 62 of file ast.hpp.

References inlineObjects.

◆ addSection()

void mxvm::ProgramNode::addSection ( std::unique_ptr< SectionNode > section)
inline

Definition at line 58 of file ast.hpp.

References sections.

◆ toString()

std::string mxvm::ProgramNode::toString ( ) const
overridevirtual

Implements mxvm::ASTNode.

Definition at line 16 of file ast.cpp.

References sections.

Member Data Documentation

◆ inlineObjects

std::vector<std::unique_ptr<ProgramNode> > mxvm::ProgramNode::inlineObjects

Definition at line 56 of file ast.hpp.

Referenced by addInlineObject().

◆ name

std::string mxvm::ProgramNode::name

Definition at line 52 of file ast.hpp.

◆ object

bool mxvm::ProgramNode::object = false

true if this node represents an object rather than a program

Definition at line 53 of file ast.hpp.

◆ root_name

std::string mxvm::ProgramNode::root_name

Definition at line 54 of file ast.hpp.

◆ sections

std::vector<std::unique_ptr<SectionNode> > mxvm::ProgramNode::sections

Definition at line 55 of file ast.hpp.

Referenced by addSection(), and toString().


The documentation for this class was generated from the following files: