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

AST node for a pointer type declaration (^BaseType). More...

#include <ast.hpp>

Inheritance diagram for pascal::PointerTypeNode:

Public Member Functions

 PointerTypeNode (const std::string &base)
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::string baseTypeName
 the type being pointed to

Detailed Description

AST node for a pointer type declaration (^BaseType).

Definition at line 578 of file ast.hpp.

Constructor & Destructor Documentation

◆ PointerTypeNode()

pascal::PointerTypeNode::PointerTypeNode ( const std::string & base)
inline

Definition at line 582 of file ast.hpp.

References baseTypeName.

Member Function Documentation

◆ accept()

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

Accept an ASTVisitor (double-dispatch).

Implements pascal::ASTNode.

Definition at line 430 of file ast.cpp.

References pascal::ASTVisitor::visit().

◆ toString()

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

Return a human-readable description of this node.

Implements pascal::ASTNode.

Definition at line 585 of file ast.hpp.

References baseTypeName.

Member Data Documentation

◆ baseTypeName

std::string pascal::PointerTypeNode::baseTypeName

the type being pointed to

Definition at line 580 of file ast.hpp.

Referenced by PointerTypeNode(), and toString().


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