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

AST node for an address-of expression (@operand). More...

#include <ast.hpp>

Inheritance diagram for pascal::AddressOfNode:

Public Member Functions

 AddressOfNode (std::unique_ptr< ASTNode > op)
void accept (ASTVisitor &visitor) override
 Accept an ASTVisitor (double-dispatch).
std::string toString () const override
 Return a human-readable description of this node.
Public Member Functions inherited from pascal::ASTNode
virtual ~ASTNode ()=default
virtual void print (std::ostream &out, int indent=0) const
 Pretty-print this node to a stream with indentation.
void setLineNumber (int line)
 Set the originating source line number.
int getLineNumber () const
 Get the originating source line number.

Public Attributes

std::unique_ptr< ASTNodeoperand
 operand whose address is taken

Detailed Description

AST node for an address-of expression (@operand).

Definition at line 600 of file ast.hpp.

Constructor & Destructor Documentation

◆ AddressOfNode()

pascal::AddressOfNode::AddressOfNode ( std::unique_ptr< ASTNode > op)
inline

Definition at line 604 of file ast.hpp.

References operand.

Member Function Documentation

◆ accept()

void pascal::AddressOfNode::accept ( ASTVisitor & visitor)
overridevirtual

Accept an ASTVisitor (double-dispatch).

Implements pascal::ASTNode.

Definition at line 438 of file ast.cpp.

References pascal::ASTVisitor::visit().

◆ toString()

std::string pascal::AddressOfNode::toString ( ) const
inlineoverridevirtual

Return a human-readable description of this node.

Implements pascal::ASTNode.

Definition at line 607 of file ast.hpp.

Member Data Documentation

◆ operand

std::unique_ptr<ASTNode> pascal::AddressOfNode::operand

operand whose address is taken

Definition at line 602 of file ast.hpp.

Referenced by AddressOfNode(), and pascal::CodeGenVisitor::visit().


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