diff options
author | John Hodge <tpg@mutabah.net> | 2016-02-25 15:49:24 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-02-25 15:49:24 +0800 |
commit | 5087cc1ef01303c8635fb82d0957ba214b379ca2 (patch) | |
tree | 0bfdefc02b18e3ad1342343de64cd2d0faf98613 | |
parent | d0eac5864a00b6d94ac918764ad045d91463cda7 (diff) | |
download | mrust-5087cc1ef01303c8635fb82d0957ba214b379ca2.tar.gz |
Parse - Fix slice pattern parse
-rw-r--r-- | src/parse/pattern.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse/pattern.cpp b/src/parse/pattern.cpp index 12f35aa7..2d3a0615 100644 --- a/src/parse/pattern.cpp +++ b/src/parse/pattern.cpp @@ -233,7 +233,7 @@ AST::Pattern Parse_PatternReal_Slice(TokenStream& lex, bool is_refutable) bool is_trailing = false; while(GET_TOK(tok, lex) != TOK_SQUARE_CLOSE) { - if( tok.type() == TOK_IDENT && lex.lookahead(1) == TOK_DOUBLE_DOT) { + if( tok.type() == TOK_IDENT && lex.lookahead(0) == TOK_DOUBLE_DOT) { if(is_trailing) ERROR(lex.end_span(sp), E0000, "Multiple instances of .. in a slice pattern"); rv_array.extra_bind = mv$(tok.str()); |