Added Type class, bettered types a bit, made address of and dereference operators work.
This commit is contained in:
29
include/Type.h
Normal file
29
include/Type.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef TYPE_H
|
||||
#define TYPE_H
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
enum ValueType {none, void_type, boolean, integer, floating, double_percision, character };
|
||||
|
||||
|
||||
class Type {
|
||||
public:
|
||||
Type();
|
||||
Type(ValueType typeIn, int indirectionIn);
|
||||
Type(ValueType typeIn);
|
||||
Type(std::string typeIn);
|
||||
~Type();
|
||||
std::string toString();
|
||||
ValueType baseType;
|
||||
int indirection;
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user