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

AST node for a pointer dereference (ptr^). More...

#include <ast.hpp>

Inheritance diagram for pascal::PointerDerefNode:

Public Member Functions

 PointerDerefNode (std::unique_ptr< ASTNode > ptr)
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< ASTNode > pointer
 expression yielding a pointer

Detailed Description

AST node for a pointer dereference (ptr^).

Definition at line 589 of file ast.hpp.

Constructor & Destructor Documentation

◆ PointerDerefNode()

pascal::PointerDerefNode::PointerDerefNode ( std::unique_ptr< ASTNode > ptr)
inline

Definition at line 593 of file ast.hpp.

References pointer.

Member Function Documentation

◆ accept()

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

Accept an ASTVisitor (double-dispatch).

Implements pascal::ASTNode.

Definition at line 434 of file ast.cpp.

References pascal::ASTVisitor::visit().

◆ toString()

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

Return a human-readable description of this node.

Implements pascal::ASTNode.

Definition at line 596 of file ast.hpp.

Member Data Documentation

◆ pointer

std::unique_ptr<ASTNode> pascal::PointerDerefNode::pointer

expression yielding a pointer

Definition at line 591 of file ast.hpp.

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


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