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

AST node for a procedure call statement. More...

#include <ast.hpp>

Inheritance diagram for pascal::ProcCallNode:

Public Member Functions

 ProcCallNode (const std::string &procName, std::vector< std::unique_ptr< ASTNode > > args)
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 name
 procedure name
std::vector< std::unique_ptr< ASTNode > > arguments
 actual arguments

Detailed Description

AST node for a procedure call statement.

Definition at line 425 of file ast.hpp.

Constructor & Destructor Documentation

◆ ProcCallNode()

pascal::ProcCallNode::ProcCallNode ( const std::string & procName,
std::vector< std::unique_ptr< ASTNode > > args )
inline

Definition at line 430 of file ast.hpp.

References arguments, and name.

Member Function Documentation

◆ accept()

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

Accept an ASTVisitor (double-dispatch).

Implements pascal::ASTNode.

Definition at line 157 of file ast.cpp.

References pascal::ASTVisitor::visit().

◆ toString()

std::string pascal::ProcCallNode::toString ( ) const
overridevirtual

Return a human-readable description of this node.

Implements pascal::ASTNode.

Definition at line 161 of file ast.cpp.

References arguments, and name.

Member Data Documentation

◆ arguments

std::vector<std::unique_ptr<ASTNode> > pascal::ProcCallNode::arguments

actual arguments

Definition at line 428 of file ast.hpp.

Referenced by ProcCallNode(), toString(), and pascal::CodeGenVisitor::visit().

◆ name

std::string pascal::ProcCallNode::name

procedure name

Definition at line 427 of file ast.hpp.

Referenced by ProcCallNode(), toString(), and pascal::CodeGenVisitor::visit().


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