diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-09-23 11:15:17 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-09-23 15:15:30 -0700 |
| commit | 2082f67765947d1c84efdf0b374e0b80f535f109 (patch) | |
| tree | 42f5072c3741fd29e2c3d84a440a10f42a392ec0 /src/comp/syntax/parse | |
| parent | 87700adb2f42bd0751346c063390af33cb7e9e0f (diff) | |
| download | rust-2082f67765947d1c84efdf0b374e0b80f535f109.tar.gz rust-2082f67765947d1c84efdf0b374e0b80f535f109.zip | |
Begin to support pattern matching on unique boxes
Issue #409
Diffstat (limited to 'src/comp/syntax/parse')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index aa377ac1956..a3918986175 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -1425,6 +1425,12 @@ fn parse_pat(p: parser) -> @ast::pat { pat = ast::pat_box(sub); hi = sub.span.hi; } + token::TILDE. { + p.bump(); + let sub = parse_pat(p); + pat = ast::pat_uniq(sub); + hi = sub.span.hi; + } token::LBRACE. { p.bump(); let fields = []; |
