tipc
A TIP to LLVM compiler
TipVar.h
Go to the documentation of this file.
1 #pragma once
2 #include "AST.h"
3 #include "TipType.h"
4 #include <iostream>
5 #include <memory>
6 #include <string>
7 
13 class TipVar : public TipType {
14 public:
15  TipVar() = default;
17 
18  bool operator==(const TipType &other) const override;
19  bool operator!=(const TipType &other) const override;
20 
21  ASTNode *getNode() const { return node; }
22 
23  void accept(TipTypeVisitor *visitor) override;
24 
25 protected:
27  std::ostream &print(std::ostream &out) const override;
28 
30 };
Abstract base class for all AST nodes.
Definition: ASTNode.h:34
Base class for TIP type visitors.
Definition: TipTypeVisitor.h:24
Abstract base class of all types.
Definition: TipType.h:19
Class representing a type variable.
Definition: TipVar.h:13
bool operator==(const TipType &other) const override
Definition: TipVar.cpp:10
std::ostream & print(std::ostream &out) const override
Type variables printed as ASTNodecol.
Definition: TipVar.cpp:24
bool operator!=(const TipType &other) const override
Definition: TipVar.cpp:20
ASTNode * node
Definition: TipVar.h:29
void accept(TipTypeVisitor *visitor) override
Definition: TipVar.cpp:30
ASTNode * getNode() const
Definition: TipVar.h:21
TipVar()=default