diff options
author | John Hodge <tpg@mutabah.net> | 2016-08-19 22:08:24 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-08-19 22:08:24 +0800 |
commit | c805e9e03db7e7b48f04824ccf5e625a20032af9 (patch) | |
tree | bf27192754ffa315a522391abe91378801e47ca5 /src/parse/types.cpp | |
parent | 0ad915eb4919e8bdb036015f221b57c7f3de912c (diff) | |
download | mrust-c805e9e03db7e7b48f04824ccf5e625a20032af9.tar.gz |
AST - Support ! as a real type
Diffstat (limited to 'src/parse/types.cpp')
-rw-r--r-- | src/parse/types.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse/types.cpp b/src/parse/types.cpp index 34afc484..d960d1d3 100644 --- a/src/parse/types.cpp +++ b/src/parse/types.cpp @@ -40,7 +40,7 @@ TypeRef Parse_Type_Int(TokenStream& lex, bool allow_trait_list) return TypeRef(TypeRef::TagMacro(), Parse_MacroInvocation(ps, AST::MetaItems(), mv$(tok.str()), lex)); // '!' - Only ever used as part of function prototypes, but is kinda a type... not allowed here though case TOK_EXCLAM: - throw ParseError::Generic(lex, "! is not a real type"); + return TypeRef( Span(tok.get_pos()), TypeData::make_Bang({}) ); // '_' = Wildcard (type inferrence variable) case TOK_UNDERSCORE: return TypeRef(Span(tok.get_pos())); |