summaryrefslogtreecommitdiff
path: root/ast/ast.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ast/ast.hpp')
-rw-r--r--ast/ast.hpp36
1 files changed, 35 insertions, 1 deletions
diff --git a/ast/ast.hpp b/ast/ast.hpp
index f637e742..f84f322f 100644
--- a/ast/ast.hpp
+++ b/ast/ast.hpp
@@ -1,6 +1,12 @@
#ifndef AST_HPP_INCLUDED
#define AST_HPP_INCLUDED
+#include <string>
+#include <vector>
+#include "../coretypes.hpp"
+
+class TypeRef;
+
namespace AST {
class Path
@@ -9,10 +15,38 @@ public:
void append(::std::string str) {}
};
+class ExprNode
+{
+public:
+ struct TagAssign {};
+ ExprNode(TagAssign, ExprNode slot, ExprNode value) {}
+ struct TagInteger {};
+
+ ExprNode(TagInteger, uint64_t value, enum eCoreType datatype);
+};
+
+class Expr
+{
+public:
+ Expr(ExprNode node) {}
+};
+
+class TypeParam
+{
+public:
+ TypeParam(bool is_lifetime, ::std::string name);
+ void addLifetimeBound(::std::string name);
+ void addTypeBound(TypeRef type);
+};
+
+typedef ::std::vector<TypeParam> TypeParams;
+
class Module
{
public:
- void add_alias(Path path) {}
+ void add_alias(bool is_public, Path path) {}
+ void add_constant(bool is_public, ::std::string name, TypeRef type, Expr val);
+ void add_global(bool is_public, bool is_mut, ::std::string name, TypeRef type, Expr val);
};
}