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

AST node representing a single MXVM instruction with its operands. More...

#include <ast.hpp>

Inheritance diagram for mxvm::InstructionNode:

Public Member Functions

 InstructionNode (Inc inst)
 InstructionNode (Inc inst, const std::vector< Operand > &ops)
void addOperand (const Operand &operand)
void accept (ASTVisitor &visitor) override
std::string toString () const override
Public Member Functions inherited from mxvm::ASTNode
virtual ~ASTNode ()=default

Public Attributes

Inc instruction
 instruction opcode
std::vector< Operand > operands

Detailed Description

AST node representing a single MXVM instruction with its operands.

Definition at line 113 of file ast.hpp.

Constructor & Destructor Documentation

◆ InstructionNode() [1/2]

mxvm::InstructionNode::InstructionNode ( Inc inst)
inline

Definition at line 118 of file ast.hpp.

References instruction.

◆ InstructionNode() [2/2]

mxvm::InstructionNode::InstructionNode ( Inc inst,
const std::vector< Operand > & ops )
inline

Definition at line 120 of file ast.hpp.

References instruction, and operands.

Member Function Documentation

◆ accept()

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

Implements mxvm::ASTNode.

Definition at line 41 of file ast.cpp.

References mxvm::ASTVisitor::visit().

◆ addOperand()

void mxvm::InstructionNode::addOperand ( const Operand & operand)
inline

Definition at line 123 of file ast.hpp.

References operands.

◆ toString()

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

Implements mxvm::ASTNode.

Definition at line 45 of file ast.cpp.

References instruction, and operands.

Member Data Documentation

◆ instruction

Inc mxvm::InstructionNode::instruction

instruction opcode

Definition at line 115 of file ast.hpp.

Referenced by InstructionNode(), InstructionNode(), and toString().

◆ operands

std::vector<Operand> mxvm::InstructionNode::operands

Definition at line 116 of file ast.hpp.

Referenced by InstructionNode(), addOperand(), and toString().


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