tipc
A TIP to LLVM compiler
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TipAlpha Class Reference

Class for free type variables. More...

#include <TipAlpha.h>

Inheritance diagram for TipAlpha:
Inheritance graph
[legend]
Collaboration diagram for TipAlpha:
Collaboration graph
[legend]

Public Member Functions

 TipAlpha ()=delete
 
 TipAlpha (ASTNode *node)
 Constructor for all non-record nodes. More...
 
 TipAlpha (ASTNode *node, std::string const name)
 Constructor for record or access exprs. More...
 
 TipAlpha (ASTNode *node, ASTNode *context, std::string const name)
 Constructor for creating context specific alphas. More...
 
ASTNodegetContext () const
 
std::string const & getName () const
 
bool operator== (const TipType &other) const override
 
bool operator!= (const TipType &other) const override
 
void accept (TipTypeVisitor *visitor) override
 
- Public Member Functions inherited from TipVar
 TipVar ()=default
 
 TipVar (ASTNode *node)
 
bool operator== (const TipType &other) const override
 
bool operator!= (const TipType &other) const override
 
ASTNodegetNode () const
 
void accept (TipTypeVisitor *visitor) override
 
- Public Member Functions inherited from TipType
virtual ~TipType ()=default
 

Protected Member Functions

std::ostream & print (std::ostream &out) const override
 
- Protected Member Functions inherited from TipVar
std::ostream & print (std::ostream &out) const override
 Type variables printed as ASTNodecol. More...
 

Protected Attributes

ASTNodecontext
 
std::string const name
 
- Protected Attributes inherited from TipVar
ASTNodenode
 

Detailed Description

Class for free type variables.

Constructor & Destructor Documentation

◆ TipAlpha() [1/4]

TipAlpha::TipAlpha ( )
delete

◆ TipAlpha() [2/4]

TipAlpha::TipAlpha ( ASTNode node)

Constructor for all non-record nodes.

Parameters
nodeThe expression or decl node

◆ TipAlpha() [3/4]

TipAlpha::TipAlpha ( ASTNode node,
std::string const  name 
)

Constructor for record or access exprs.

Parameters
nodeThe record or access expr
nameThe field name

◆ TipAlpha() [4/4]

TipAlpha::TipAlpha ( ASTNode node,
ASTNode context,
std::string const  name 
)

Constructor for creating context specific alphas.

Parameters
nodeThe ASTNode for the original alpha
nodeThe ASTNode for its usage context
nameThe field name or empty

Member Function Documentation

◆ accept()

void TipAlpha::accept ( TipTypeVisitor visitor)
overridevirtual

Implements TipType.

◆ getContext()

ASTNode * TipAlpha::getContext ( ) const

◆ getName()

std::string const & TipAlpha::getName ( ) const

◆ operator!=()

bool TipAlpha::operator!= ( const TipType other) const
overridevirtual

Implements TipType.

◆ operator==()

bool TipAlpha::operator== ( const TipType other) const
overridevirtual

Implements TipType.

◆ print()

std::ostream & TipAlpha::print ( std::ostream &  out) const
overrideprotectedvirtual

Implements TipType.

Member Data Documentation

◆ context

ASTNode* TipAlpha::context
protected

◆ name

std::string const TipAlpha::name
protected

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