diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-09-23 22:06:54 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-09-23 22:06:54 +0800 |
commit | 13fe9d251a1848bb4e9e3825729d06a053724c3b (patch) | |
tree | 9202787b8ad18239e5620139950a0e38e91b50d7 /src/parse | |
parent | 2a1a72508a37415cf74b4939fc6710e79bc83772 (diff) | |
download | mrust-13fe9d251a1848bb4e9e3825729d06a053724c3b.tar.gz |
Parse - Handle `_:` in fn types
Diffstat (limited to 'src/parse')
-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 ff993693..26785cf7 100644 --- a/src/parse/types.cpp +++ b/src/parse/types.cpp @@ -238,7 +238,7 @@ TypeRef Parse_Type_Fn(TokenStream& lex, ::std::vector<::std::string> hrls) break; } // Handle `ident: ` - if( lex.lookahead(0) == TOK_IDENT && lex.lookahead(1) == TOK_COLON ) { + if( (lex.lookahead(0) == TOK_IDENT || lex.lookahead(0) == TOK_UNDERSCORE) && lex.lookahead(1) == TOK_COLON ) { GET_TOK(tok, lex); GET_TOK(tok, lex); } |