about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
AgeCommit message (Collapse)AuthorLines
2019-09-15Give more `Idents` spansMatthew Jasper-1/+1
2019-09-09Resolve attributes in several placesCaio-3/+14
Arm, Field, FieldPat, GenericParam, Param, StructField and Variant
2019-09-07Apply suggestions from code reviewAlexander Regueiro-6/+6
2019-09-07Aggregation of cosmetic changes made during work on REPL PRs: libsyntaxAlexander Regueiro-166/+164
2019-09-07Rollup merge of #64192 - estebank:turbofish-madness, r=petrochenkovMazdak Farrokhzad-1/+1
Bail out when encountering likely missing turbofish in parser When encountering a likely intended turbofish without `::`, bubble up the diagnostic instead of emitting it to allow the parser to recover more gracefully and avoid uneccessary type errors that are likely to be wrong. Fix #61329.
2019-09-06Rollup merge of #64202 - alexreg:rush-pr-1, r=CentrilMazdak Farrokhzad-2/+2
Fixed grammar/style in some error messages Factored out from hacking on rustc for work on the REPL. r? @Centril
2019-09-06Fixed grammar/style in error messages and reblessed tests.Alexander Regueiro-2/+2
2019-09-05Bail out when encountering likely missing turbofish in parserEsteban Küber-1/+1
When encountering a likely intended turbofish without `::`, bubble up the diagnostic instead of emitting it to allow the parser to recover more gracefully and avoid uneccessary type errors that are likely to be wrong.
2019-09-05or-patterns: syntax: adjust parser removing a hack.Mazdak Farrokhzad-15/+3
Fuse `parse_top_pat` and `parse_top_pat_unpack` into just `parse_top_pat`.
2019-09-03Move path parsing earlier.Nicholas Nethercote-26/+30
It's a hot enough path that moving it slightly earlier gives a tiny but easy speedup.
2019-08-29Rollup merge of #63945 - Centril:recover-mut-pat, r=estebankMazdak Farrokhzad-30/+127
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-29Rollup merge of #63938 - tshepang:typo, r=CentrilMazdak Farrokhzad-1/+1
or-pattern: fix typo in error message cc https://github.com/rust-lang/rust/issues/54883.
2019-08-28or-pattern: fix typo in error messageTshepang Lekhonkhobe-1/+1
2019-08-27Improve 'mut ' diagnostic.Mazdak Farrokhzad-20/+34
2019-08-27Ensure 'let mut ;' where ':pat' is banned.Mazdak Farrokhzad-0/+9
2019-08-27Cleanup: Consistently use `Param` instead of `Arg` #62426Kevin Per-12/+12
2019-08-27recover on 'mut ' and improve recovery for keywords.Mazdak Farrokhzad-31/+105
2019-08-27Simplify with Symbol/Token::is_book_lit.Mazdak Farrokhzad-1/+1
2019-08-26parser: fix span for leading vert.Mazdak Farrokhzad-1/+2
2019-08-25parser: TopLevel -> RecoverComma.Mazdak Farrokhzad-10/+10
2019-08-25parser: gracefully handle `fn foo(A | B: type)`.Mazdak Farrokhzad-10/+40
2019-08-25parser: 'while parsing this or-pattern...'Mazdak Farrokhzad-1/+4
2019-08-25parser: simplify parse_pat_with_or_{inner}Mazdak Farrokhzad-17/+10
2019-08-24parser: reword || recovery.Mazdak Farrokhzad-1/+1
2019-08-24parser: extract recover_inner_leading_vert.Mazdak Farrokhzad-4/+7
2019-08-24parse_top_pat: silence leading vert gating sometimes.Mazdak Farrokhzad-3/+15
2019-08-24parser: bool -> TopLevel.Mazdak Farrokhzad-5/+9
2019-08-24parser: bool -> GateOr.Mazdak Farrokhzad-10/+16
2019-08-24parser: better recovery for || in inner pats.Mazdak Farrokhzad-4/+23
2019-08-24parser: `let` stmts & `for` exprs: allow or-patterns.Mazdak Farrokhzad-8/+2
2019-08-24parser: document `parse_pat`.Mazdak Farrokhzad-0/+4
2019-08-24parser: `parse_pats` -> `parse_top_pat{_unpack}`.Mazdak Farrokhzad-16/+24
2019-08-24parser: document `ban_unexpected_or_or`.Mazdak Farrokhzad-0/+1
2019-08-24parser: move `maybe_recover_unexpected_comma` to a more appropriate place.Mazdak Farrokhzad-50/+49
2019-08-24parser: use `eat_or_separator` for leading vert.Mazdak Farrokhzad-2/+2
2019-08-24parser: improve `parse_pat_with_or` docs.Mazdak Farrokhzad-1/+2
2019-08-24parser: extract `eat_or_separator`.Mazdak Farrokhzad-30/+28
2019-08-24parser: integrate `maybe_recover_unexpected_comma` in `parse_pat_with_or`.Mazdak Farrokhzad-9/+17
2019-08-24parser: extract `maybe_recover_unexpected_comma`.Mazdak Farrokhzad-31/+36
2019-08-24parser: simplify `parse_pat_with_or`.Mazdak Farrokhzad-1/+1
2019-08-24parser: improve or-patterns recovery.Mazdak Farrokhzad-4/+11
2019-08-24parser: refactor `parse_pat_with_or` + use it in [p0, p1, ..] pats.Mazdak Farrokhzad-8/+15
2019-08-24parser: type alias `type Expected = Option<&'static str>;`.Mazdak Farrokhzad-8/+7
2019-08-24parser: extract `ban_unexpected_or_or`.Mazdak Farrokhzad-11/+13
2019-08-21Rollup merge of #63759 - Centril:parse-default-async-fn, r=petrochenkovMazdak Farrokhzad-0/+1
Allow 'default async fn' to parse. - Parse default async fn. Fixes #63716. (`cherry-pick`ed from 3rd commit in https://github.com/rust-lang/rust/pull/63749.) r? @petrochenkov
2019-08-20Allow 'default async fn' to parse.Mazdak Farrokhzad-0/+1
2019-08-20Use dedicated type for spans in pre-expansion gating.Mazdak Farrokhzad-5/+5
2019-08-17initial implementation of or-pattern parsingDan Robertson-4/+37
Initial implementation of parsing or-patterns e.g., `Some(Foo | Bar)`. This is a partial implementation of RFC 2535.
2019-08-16Feature gate 'yield ?' pre-expansion.Mazdak Farrokhzad-0/+3
2019-08-15`Ident::with_empty_ctxt` -> `Ident::with_dummy_span`Vadim Petrochenkov-1/+1
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.