diff options
author | John Hodge <tpg@mutabah.net> | 2016-10-22 10:22:24 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-10-22 16:00:27 +0800 |
commit | e29fa8f3a2b429ed2da10bd941c52cb80c8bc859 (patch) | |
tree | 25ba96fe4cc5e9cf8803b0a62d8f528e7d29d761 /src | |
parent | d6be60461c36f8a365fffb3ab601afbb2c92c0b8 (diff) | |
download | mrust-e29fa8f3a2b429ed2da10bd941c52cb80c8bc859.tar.gz |
Parse/Pattern - Handle interpolated patterns after bindings
Diffstat (limited to 'src')
-rw-r--r-- | src/parse/pattern.cpp | 5 |
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 ) { |