summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-22 10:22:24 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-22 16:00:27 +0800
commite29fa8f3a2b429ed2da10bd941c52cb80c8bc859 (patch)
tree25ba96fe4cc5e9cf8803b0a62d8f528e7d29d761 /src
parentd6be60461c36f8a365fffb3ab601afbb2c92c0b8 (diff)
downloadmrust-e29fa8f3a2b429ed2da10bd941c52cb80c8bc859.tar.gz
Parse/Pattern - Handle interpolated patterns after bindings
Diffstat (limited to 'src')
-rw-r--r--src/parse/pattern.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parse/pattern.cpp b/src/parse/pattern.cpp
index 30d98fb6..2b1be50e 100644
--- a/src/parse/pattern.cpp
+++ b/src/parse/pattern.cpp
@@ -144,6 +144,11 @@ AST::Pattern Parse_Pattern(TokenStream& lex, bool is_refutable)
AST::Pattern Parse_PatternReal(TokenStream& lex, bool is_refutable)
{
Token tok;
+ if( LOOK_AHEAD(lex) == TOK_INTERPOLATED_PATTERN )
+ {
+ GET_TOK(tok, lex);
+ return mv$(tok.frag_pattern());
+ }
AST::Pattern ret = Parse_PatternReal1(lex, is_refutable);
if( GET_TOK(tok, lex) == TOK_TRIPLE_DOT )
{