summaryrefslogtreecommitdiff
path: root/src/ast
diff options
context:
space:
mode:
authorJohn Hodge (bugs) <tpg@mutabah.net>2017-03-04 18:12:49 +0800
committerJohn Hodge (bugs) <tpg@mutabah.net>2017-03-04 18:12:49 +0800
commitc6fca061dd134068c831aefd88d9535a30f423ed (patch)
tree28fc4abecddf8514792a4cb748f1c6e5700274c1 /src/ast
parent03addc877bab648ccde022edec29f5b051ce7cb9 (diff)
downloadmrust-c6fca061dd134068c831aefd88d9535a30f423ed.tar.gz
Many many changes to allow compiling in visual studio (Community 2015)
Diffstat (limited to 'src/ast')
-rw-r--r--src/ast/generics.hpp10
-rw-r--r--src/ast/path.hpp14
-rw-r--r--src/ast/pattern.hpp1
-rw-r--r--src/ast/types.hpp2
4 files changed, 17 insertions, 10 deletions
diff --git a/src/ast/generics.hpp b/src/ast/generics.hpp
index 2de5aeaa..bc14202e 100644
--- a/src/ast/generics.hpp
+++ b/src/ast/generics.hpp
@@ -1,3 +1,10 @@
+/*
+ * MRustC - Rust Compiler
+ * - By John Hodge (Mutabah/thePowersGang)
+ *
+ * ast/generics.hpp
+ * - AST Generics (type parameters, bounds, ...)
+ */
#pragma once
#include <string>
@@ -5,11 +12,10 @@
namespace AST {
-
class TypeParam
{
::std::string m_name;
- TypeRef m_default;
+ ::TypeRef m_default;
public:
TypeParam(TypeParam&& x) = default;
TypeParam& operator=(TypeParam&& x) = default;
diff --git a/src/ast/path.hpp b/src/ast/path.hpp
index 7a67b93e..f3a72133 100644
--- a/src/ast/path.hpp
+++ b/src/ast/path.hpp
@@ -48,27 +48,27 @@ TAGGED_UNION_EX(PathBinding, (), Unbound, (
}),
(Module, struct {
const Module* module_;
- const ::HIR::Module* hir = nullptr;
+ const ::HIR::Module* hir;
}),
(Struct, struct {
const Struct* struct_;
- const ::HIR::Struct* hir = nullptr;
+ const ::HIR::Struct* hir;
}),
(Enum, struct {
const Enum* enum_;
- const ::HIR::Enum* hir = nullptr;
+ const ::HIR::Enum* hir;
}),
(Union, struct {
const Union* union_;
- const ::HIR::Union* hir = nullptr;
+ const ::HIR::Union* hir;
}),
(Trait, struct {
const Trait* trait_;
- const ::HIR::Trait* hir = nullptr;
+ const ::HIR::Trait* hir;
}),
(Static, struct {
const Static* static_;
- const ::HIR::Static* hir = nullptr; // if nullptr and static_ == nullptr, points to a `const`
+ const ::HIR::Static* hir; // if nullptr and static_ == nullptr, points to a `const`
}),
(Function, struct {
const Function* func_;
@@ -76,7 +76,7 @@ TAGGED_UNION_EX(PathBinding, (), Unbound, (
(EnumVar, struct {
const Enum* enum_;
unsigned int idx;
- const ::HIR::Enum* hir = nullptr;
+ const ::HIR::Enum* hir;
}),
(TypeAlias, struct {
const TypeAlias* alias_;
diff --git a/src/ast/pattern.hpp b/src/ast/pattern.hpp
index af6a5adf..583ce351 100644
--- a/src/ast/pattern.hpp
+++ b/src/ast/pattern.hpp
@@ -14,6 +14,7 @@
#include <string>
#include <tagged_union.hpp>
#include <ident.hpp>
+#include "path.hpp"
namespace AST {
diff --git a/src/ast/types.hpp b/src/ast/types.hpp
index e2114bae..314ab828 100644
--- a/src/ast/types.hpp
+++ b/src/ast/types.hpp
@@ -3,7 +3,7 @@
#include <memory>
-#include "common.hpp"
+#include "../common.hpp"
#include "coretypes.hpp"
#include "ast/path.hpp"
#include "ast/macro.hpp"