diff options
author | John Hodge <tpg@mutabah.net> | 2016-03-05 21:49:35 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-03-05 21:49:35 +0800 |
commit | f430222343e18fec9f97c9b9fdfdc17667b94505 (patch) | |
tree | 4b5e82d2e4bf3b03b4e368e582c761cf8deb3834 /src/parse | |
parent | 2e34ca9516343185c9beee0ed83e7be247812c28 (diff) | |
download | mrust-f430222343e18fec9f97c9b9fdfdc17667b94505.tar.gz |
Parse - Starting on run-fail
Diffstat (limited to 'src/parse')
-rw-r--r-- | src/parse/expr.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/parse/expr.cpp b/src/parse/expr.cpp index 2f723ef9..a57cf487 100644 --- a/src/parse/expr.cpp +++ b/src/parse/expr.cpp @@ -939,8 +939,16 @@ ExprNodeP Parse_ExprVal_Closure(TokenStream& lex, bool is_move) CHECK_TOK(tok, TOK_PIPE);
TypeRef rt;
- if( GET_TOK(tok, lex) == TOK_THINARROW )
- rt = Parse_Type(lex);
+ if( GET_TOK(tok, lex) == TOK_THINARROW ) {
+
+ if( GET_TOK(tok, lex) == TOK_EXCLAM ) {
+ rt = TypeRef(TypeRef::TagInvalid());
+ }
+ else {
+ lex.putback(tok);
+ rt = Parse_Type(lex);
+ }
+ }
else
lex.putback(tok);
|