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

AST node for a set literal [val1, val2, ...]. More...

#include <ast.hpp>

Inheritance diagram for pascal::SetLiteralNode:

Public Member Functions

 SetLiteralNode (std::vector< std::unique_ptr< ASTNode > > elems)
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::vector< std::unique_ptr< ASTNode > > elements
 set elements

Detailed Description

AST node for a set literal [val1, val2, ...].

Definition at line 705 of file ast.hpp.

Constructor & Destructor Documentation

◆ SetLiteralNode()

pascal::SetLiteralNode::SetLiteralNode ( std::vector< std::unique_ptr< ASTNode > > elems)
inline

Definition at line 709 of file ast.hpp.

References elements.

Member Function Documentation

◆ accept()

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

Accept an ASTVisitor (double-dispatch).

Implements pascal::ASTNode.

Definition at line 454 of file ast.cpp.

References pascal::ASTVisitor::visit().

◆ toString()

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

Return a human-readable description of this node.

Implements pascal::ASTNode.

Definition at line 713 of file ast.hpp.

Member Data Documentation

◆ elements

std::vector<std::unique_ptr<ASTNode> > pascal::SetLiteralNode::elements

set elements

Definition at line 707 of file ast.hpp.

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


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