MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
Loading...
Searching...
No Matches
instruct.cpp File Reference

Instruction toString(), keyword table, and opcode stream operator. More...

#include "mxvm/instruct.hpp"
#include <sstream>
Include dependency graph for instruct.cpp:

Go to the source code of this file.

Namespaces

namespace  mxvm

Functions

std::ostream & operator<< (std::ostream &out, const mxvm::Keywords &key)
 Stream insertion operator for Keywords.
std::ostream & operator<< (std::ostream &out, const enum Inc &i)
 Stream insertion operator for Inc opcodes.
std::ostream & operator<< (std::ostream &out, const mxvm::Instruction &inc)
 Stream insertion operator for Instruction.
std::ostream & operator<< (std::ostream &out, const mxvm::VarType &type)
 Stream insertion operator for VarType.

Detailed Description

Instruction toString(), keyword table, and opcode stream operator.

Author
Jared Bruni

Definition in file instruct.cpp.

Function Documentation

◆ operator<<() [1/4]

std::ostream & operator<< ( std::ostream & out,
const enum Inc & i )

Stream insertion operator for Inc opcodes.

Parameters
outOutput stream
iOpcode to print
Returns
Reference to the output stream

Definition at line 23 of file instruct.cpp.

References IncType, and pos().

◆ operator<<() [2/4]

std::ostream & operator<< ( std::ostream & out,
const mxvm::Instruction & inc )

Stream insertion operator for Instruction.

Parameters
outOutput stream
incInstruction to format and print
Returns
Reference to the output stream

Definition at line 32 of file instruct.cpp.

References mxvm::Instruction::instruction, mxvm::Operand::op, mxvm::Instruction::op1, mxvm::Instruction::op2, mxvm::Instruction::op3, and mxvm::Instruction::vop.

◆ operator<<() [3/4]

std::ostream & operator<< ( std::ostream & out,
const mxvm::Keywords & key )

Stream insertion operator for Keywords.

Parameters
outOutput stream
keyKeyword to print
Returns
Reference to the output stream

Definition at line 14 of file instruct.cpp.

References mxvm::keywords.

◆ operator<<() [4/4]

std::ostream & operator<< ( std::ostream & out,
const mxvm::VarType & type )

Stream insertion operator for VarType.

Parameters
outOutput stream
typeVariable type to print
Returns
Reference to the output stream

Definition at line 54 of file instruct.cpp.

References mxvm::VAR_BYTE, mxvm::VAR_EXTERN, mxvm::VAR_FLOAT, mxvm::VAR_INTEGER, mxvm::VAR_POINTER, and mxvm::VAR_STRING.