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

AST node for a label (or function entry point) in the code section. More...

#include <ast.hpp>

Inheritance diagram for mxvm::LabelNode:

Public Member Functions

 LabelNode (const std::string &labelName)
void accept (ASTVisitor &visitor) override
std::string toString () const override
Public Member Functions inherited from mxvm::ASTNode
virtual ~ASTNode ()=default

Public Attributes

std::string name
bool function = false
 true if this label marks a callable function

Detailed Description

AST node for a label (or function entry point) in the code section.

Definition at line 132 of file ast.hpp.

Constructor & Destructor Documentation

◆ LabelNode()

mxvm::LabelNode::LabelNode ( const std::string & labelName)
inline

Definition at line 136 of file ast.hpp.

References name.

Member Function Documentation

◆ accept()

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

Implements mxvm::ASTNode.

Definition at line 87 of file ast.cpp.

References mxvm::ASTVisitor::visit().

◆ toString()

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

Implements mxvm::ASTNode.

Definition at line 91 of file ast.cpp.

References name.

Member Data Documentation

◆ function

bool mxvm::LabelNode::function = false

true if this label marks a callable function

Definition at line 135 of file ast.hpp.

◆ name

std::string mxvm::LabelNode::name

Definition at line 134 of file ast.hpp.

Referenced by LabelNode(), and toString().


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