From b79e71e5f11e14516f13ea2f8437d5deaa10e653 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 20 Mar 2016 12:29:44 +0800 Subject: Tagged Union - Rework to remove indirection --- src/types.hpp | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'src/types.hpp') diff --git a/src/types.hpp b/src/types.hpp index 66121d37..ba20aa26 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -58,45 +58,45 @@ struct Type_Function: }; TAGGED_UNION(TypeData, None, - (None, ()), - (Any, ()), - (Unit, ()), - (Macro, ( + (None, struct { }), + (Any, struct { }), + (Unit, struct { }), + (Macro, struct { ::AST::MacroInvocation inv; - )), - (Primitive, ( + }), + (Primitive, struct { enum eCoreType core_type; - )), - (Function, ( - Type_Function info; - )), - (Tuple, ( + }), + (Function, struct { + Type_Function info; + }), + (Tuple, struct { ::std::vector inner_types; - )), - (Borrow, ( + }), + (Borrow, struct { bool is_mut; ::std::unique_ptr inner; - )), - (Pointer, ( + }), + (Pointer, struct { bool is_mut; ::std::unique_ptr inner; - )), - (Array, ( + }), + (Array, struct { ::std::unique_ptr inner; ::std::shared_ptr size; - )), - (Generic, ( + }), + (Generic, struct { ::std::string name; unsigned int level; const ::AST::GenericParams* params; - )), - (Path, ( + }), + (Path, struct { AST::Path path; - )), - (TraitObject, ( + }), + (TraitObject, struct { ::std::vector<::std::string> hrls; ::std::vector traits; - )) + }) ); /// A type -- cgit v1.2.3