Mazdak Farrokhzad
29fb07d245
syntax: add recovery for intersection patterns p1 @ p2
2019-10-14 17:08:13 +02:00
Mazdak Farrokhzad
5f94a53d1a
Account for macro invocation in let mut $pat
diagnostic.
2019-10-05 04:34:26 +02:00
Mazdak Farrokhzad
3eba6c18d4
syntax: recover trailing |
in or-patterns.
2019-09-29 07:11:26 +02:00
varkor
8bd0382134
Rename Pat.node
to Pat.kind
2019-09-26 18:21:09 +01:00
Mark Rousskov
998df0d70b
Remove Handler::cancel
2019-09-17 09:30:44 -04:00
Caio
63a5f399ae
Resolve attributes in several places
...
Arm, Field, FieldPat, GenericParam, Param, StructField and Variant
2019-09-09 09:27:15 -03:00
Alexander Regueiro
49d2fd1725
Aggregation of cosmetic changes made during work on REPL PRs: libsyntax
2019-09-07 16:29:04 +01:00
Mazdak Farrokhzad
ad3db726d1
or-patterns: syntax: adjust parser removing a hack.
...
Fuse `parse_top_pat` and `parse_top_pat_unpack` into just `parse_top_pat`.
2019-09-05 08:33:09 +02:00
Mazdak Farrokhzad
52c3846d51
Rollup merge of #63945 - Centril:recover-mut-pat, r=estebank
...
Recover `mut $pat` and other improvements
- Recover on e.g. `mut Foo(x, y)` and suggest `Foo(mut x, mut y)`. Fixes https://github.com/rust-lang/rust/issues/63764 .
- Recover on e.g. `let mut mut x;`
- Recover on e.g. `let keyword` and `let keyword(...)`.
- Cleanups in `token.rs` with `fn is_non_raw_ident_where` and friends.
2019-08-29 05:32:48 +02:00
Tshepang Lekhonkhobe
6f67bbc445
or-pattern: fix typo in error message
2019-08-28 02:23:58 +02:00
Mazdak Farrokhzad
42e895d4d9
Improve 'mut ' diagnostic.
2019-08-27 23:44:44 +02:00
Mazdak Farrokhzad
dbbe3363c9
Ensure 'let mut ;' where ':pat' is banned.
2019-08-27 19:51:21 +02:00
Mazdak Farrokhzad
f908aa9e80
recover on 'mut ' and improve recovery for keywords.
2019-08-27 13:04:48 +02:00
Mazdak Farrokhzad
2bd27fbdfe
parser: fix span for leading vert.
2019-08-26 22:14:31 +02:00
Mazdak Farrokhzad
acb11305e8
parser: TopLevel -> RecoverComma.
2019-08-25 06:15:11 +02:00
Mazdak Farrokhzad
1caaa40768
parser: gracefully handle fn foo(A | B: type)
.
2019-08-25 05:45:19 +02:00
Mazdak Farrokhzad
083963e58c
parser: 'while parsing this or-pattern...'
2019-08-25 01:50:21 +02:00
Mazdak Farrokhzad
1202cb0e2b
parser: simplify parse_pat_with_or_{inner}
2019-08-25 01:00:19 +02:00
Mazdak Farrokhzad
0ab8430332
parser: reword || recovery.
2019-08-24 23:44:28 +02:00
Mazdak Farrokhzad
e3747722fb
parser: extract recover_inner_leading_vert.
2019-08-24 23:10:46 +02:00
Mazdak Farrokhzad
3a405421e7
parse_top_pat: silence leading vert gating sometimes.
2019-08-24 23:05:04 +02:00
Mazdak Farrokhzad
a9ef8592e4
parser: bool -> TopLevel.
2019-08-24 22:48:23 +02:00
Mazdak Farrokhzad
b2966e651d
parser: bool -> GateOr.
2019-08-24 22:29:57 +02:00
Mazdak Farrokhzad
b205055c7b
parser: better recovery for || in inner pats.
2019-08-24 21:53:55 +02:00
Mazdak Farrokhzad
95792b4d5a
parser: let
stmts & for
exprs: allow or-patterns.
2019-08-24 21:53:55 +02:00
Mazdak Farrokhzad
92d66a1317
parser: document parse_pat
.
2019-08-24 21:53:55 +02:00
Mazdak Farrokhzad
b7178ef983
parser: parse_pats
-> parse_top_pat{_unpack}
.
2019-08-24 21:53:55 +02:00
Mazdak Farrokhzad
8f6a0cdb0f
parser: document ban_unexpected_or_or
.
2019-08-24 21:32:49 +02:00
Mazdak Farrokhzad
39f5e5bec4
parser: move maybe_recover_unexpected_comma
to a more appropriate place.
2019-08-24 21:32:48 +02:00
Mazdak Farrokhzad
6498959377
parser: use eat_or_separator
for leading vert.
2019-08-24 21:32:48 +02:00
Mazdak Farrokhzad
dc5bbaf7b2
parser: improve parse_pat_with_or
docs.
2019-08-24 21:32:48 +02:00
Mazdak Farrokhzad
7b59b4f14d
parser: extract eat_or_separator
.
2019-08-24 21:32:48 +02:00
Mazdak Farrokhzad
a4a34ab62d
parser: integrate maybe_recover_unexpected_comma
in parse_pat_with_or
.
2019-08-24 21:32:48 +02:00
Mazdak Farrokhzad
21d9b85c0d
parser: extract maybe_recover_unexpected_comma
.
2019-08-24 21:32:48 +02:00
Mazdak Farrokhzad
f852c7ce1c
parser: simplify parse_pat_with_or
.
2019-08-24 21:32:48 +02:00
Mazdak Farrokhzad
30b841dce0
parser: improve or-patterns recovery.
2019-08-24 21:32:48 +02:00
Mazdak Farrokhzad
0bbea47794
parser: refactor parse_pat_with_or
+ use it in [p0, p1, ..] pats.
2019-08-24 21:32:48 +02:00
Mazdak Farrokhzad
1ba7550a89
parser: type alias type Expected = Option<&'static str>;
.
2019-08-24 21:31:54 +02:00
Mazdak Farrokhzad
5299d8a191
parser: extract ban_unexpected_or_or
.
2019-08-24 21:31:54 +02:00
Mazdak Farrokhzad
777a12c3a4
Use dedicated type for spans in pre-expansion gating.
2019-08-20 20:26:37 +02:00
Dan Robertson
1870537f27
initial implementation of or-pattern parsing
...
Initial implementation of parsing or-patterns e.g., `Some(Foo | Bar)`.
This is a partial implementation of RFC 2535.
2019-08-17 15:55:40 +00:00
Vadim Petrochenkov
a6182711ef
Remove Spanned
from {ast,hir}::FieldPat
2019-08-15 12:31:50 +03:00
Vadim Petrochenkov
433b1e36e1
Remove Spanned
from ast::Mac
2019-08-15 11:45:28 +03:00
Mazdak Farrokhzad
d4ecc6f5c0
Rollup merge of #63542 - c410-f3r:node_ids, r=petrochenkov
...
Add NodeId for Arm, Field and FieldPat
Extracted from #63468
2019-08-14 22:56:28 +02:00
Caio
9348af8396
Add NodeId for Arm, Field and FieldPat
2019-08-13 22:42:10 -03:00
Mazdak Farrokhzad
c8fc4c106c
extract parse_pat_{tuple_}struct + recover_one_fewer_dotdot
2019-08-12 12:50:44 +02:00
Mazdak Farrokhzad
ddf734deb2
extract fatal_unexpected_non_pat
2019-08-12 12:50:44 +02:00
Mazdak Farrokhzad
37f37a5df1
parser/pat: minor misc cleanup
2019-08-12 12:50:44 +02:00
Mazdak Farrokhzad
49740b792d
extract parse_pat_range_starting_with_lit
2019-08-12 12:50:44 +02:00
Mazdak Farrokhzad
e6f980f9b8
extract parse_pat_range_starting_with_path
2019-08-12 12:50:44 +02:00