tipc
A TIP to LLVM compiler
Public Member Functions | Protected Member Functions | Friends | List of all members
TipType Class Referenceabstract

Abstract base class of all types. More...

#include <TipType.h>

Inheritance diagram for TipType:
Inheritance graph
[legend]

Public Member Functions

virtual bool operator== (const TipType &other) const =0
 
virtual bool operator!= (const TipType &other) const =0
 
virtual ~TipType ()=default
 
virtual void accept (TipTypeVisitor *visitor)=0
 

Protected Member Functions

virtual std::ostream & print (std::ostream &out) const =0
 

Friends

std::ostream & operator<< (std::ostream &os, const TipType &obj)
 

Detailed Description

Abstract base class of all types.

Defines equality comparisons, output operator, and accept for visitor. Type variables and operators, like mu, directly subtype TipType. All other types, e.g., ints, functions, etc., are subtypes of TipCons, since this allows type unification to just handle TipCons. Consequently, it means that if you want to extend the types supported you will need to subtype TipCons.

Constructor & Destructor Documentation

◆ ~TipType()

virtual TipType::~TipType ( )
virtualdefault

Member Function Documentation

◆ accept()

virtual void TipType::accept ( TipTypeVisitor visitor)
pure virtual

◆ operator!=()

virtual bool TipType::operator!= ( const TipType other) const
pure virtual

◆ operator==()

virtual bool TipType::operator== ( const TipType other) const
pure virtual

◆ print()

virtual std::ostream& TipType::print ( std::ostream &  out) const
protectedpure virtual

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const TipType obj 
)
friend

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