Nearly CC
An educational compiler skeleton
Public Member Functions | List of all members
HighLevelFormatter Class Reference

Implementation of Formatter for high-level code. More...

#include "highlevel_formatter.h"

Inheritance diagram for HighLevelFormatter:
Inheritance graph
[legend]
Collaboration diagram for HighLevelFormatter:
Collaboration graph
[legend]

Public Member Functions

virtual std::string format_operand (const Operand &operand) const
 Convert a high-level Operand to a formatted string. More...
 
virtual std::string format_instruction (const Instruction *ins) const
 Convert a high-level Instruction to a formatted string. More...
 

Detailed Description

Implementation of Formatter for high-level code.

Member Function Documentation

◆ format_instruction()

std::string HighLevelFormatter::format_instruction ( const Instruction ins) const
virtual

Convert a high-level Instruction to a formatted string.

Parameters
insthe high-level Instruction to format
Returns
the string formatted from the Instruction

Implements Formatter.

◆ format_operand()

std::string HighLevelFormatter::format_operand ( const Operand operand) const
virtual

Convert a high-level Operand to a formatted string.

Parameters
operandthe high-level Operand to format
Returns
the string formatted from the Operand

Reimplemented from Formatter.


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