summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ast.h b/ast.h
index c0b0d90..700fc80 100644
--- a/ast.h
+++ b/ast.h
@@ -1,5 +1,6 @@
#pragma once
+#include <functional>
#include <iostream>
#include <string>
#include <vector>
@@ -82,4 +83,13 @@ public:
static AST makeNative(const Native &native);
};
+namespace std {
+ template <>
+ struct hash<AST::Type>{
+ size_t operator()(const AST::Type &type) const {
+ return (size_t)type;
+ }
+ };
+}
+
ostream& operator<<(ostream &os,const AST &ast);