about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser/expr.rs
AgeCommit message (Collapse)AuthorLines
2019-10-13ast: remove implicit pprust dependency via Display.Mazdak Farrokhzad-2/+5
Instead just use `pprust::path_to_string(..)` where needed. This has two benefits: a) The AST definition is now independent of printing it. (Therefore we get closer to extracting a data-crate.) b) Debugging should be easier as program flow is clearer.
2019-10-03When encountering chained operators use heuristics to recover from bad turbofishEsteban Küber-1/+3
2019-09-28syntax: don't keep a redundant c_variadic flag in the AST.Eduard-Mihai Burtescu-1/+0
2019-09-26Rename `Ty.node` to `Ty.kind`varkor-2/+2
2019-09-26Rename `Expr.node` to `Expr.kind`varkor-6/+6
For both `ast::Expr` and `hir::Expr`.
2019-09-23Auto merge of #64272 - Mark-Simulacrum:parallel-handler, r=estebankbors-1/+1
Refactor librustc_errors::Handler API This should be reviewed by-commit. The last commit moves all fields into an inner struct behind a single lock; this is done to prevent possible deadlocks in a multi-threaded compiler, as well as inconsistent state observation.
2019-09-21Rollup merge of #64136 - crgl:doc-from-parser-lhs, r=CentrilMazdak Farrokhzad-0/+7
Document From trait for LhsExpr in parser Add doc for From trait for converting P<Expr> and Option<ThinVec<Attribute>> to LhsExpr As part of issue rust-lang#51430 (cc @skade). Both of these should just be moving an address and setting a discriminant in an enum. The main thing I'm not sure about is whether it's worth documenting the branch in the From<Option<ThinVec<Attribute>>. As far as I can tell it doesn't seem like it is optimized away (although if the discriminant happened to work out you could just copy the pointer and the discriminant which might be cheaper, but that's not guaranteed). So it seems like if it's being called often, it's doubling the number of possible branch mispredictions on this Option, which could be a significant cost. Let me know if there's anything that needs fixing and I'll get to it as soon as possible!
2019-09-17Remove Handler::cancelMark Rousskov-1/+1
2019-09-16Document `From` trait for `LhsExpr`Charles Gleason-0/+7
2019-09-11Stabilize `param_attrs` in Rust 1.39.0Caio-1/+1
2019-09-09Resolve attributes in several placesCaio-1/+5
Arm, Field, FieldPat, GenericParam, Param, StructField and Variant
2019-09-07Apply suggestions from code reviewAlexander Regueiro-5/+5
2019-09-07Aggregation of cosmetic changes made during work on REPL PRs: libsyntaxAlexander Regueiro-72/+69
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-1/+1
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-1/+1
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-5/+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-27Cleanup: Consistently use `Param` instead of `Arg` #62426Kevin Per-6/+6
2019-08-25parser: gracefully handle `fn foo(A | B: type)`.Mazdak Farrokhzad-2/+2
2019-08-24parser: bool -> GateOr.Mazdak Farrokhzad-3/+4
2019-08-24parser: `let` stmts & `for` exprs: allow or-patterns.Mazdak Farrokhzad-1/+1
2019-08-24parser: `parse_pats` -> `parse_top_pat{_unpack}`.Mazdak Farrokhzad-5/+7
2019-08-20Use dedicated type for spans in pre-expansion gating.Mazdak Farrokhzad-4/+4
2019-08-16Feature gate 'yield ?' pre-expansion.Mazdak Farrokhzad-0/+3
2019-08-15Remove `Spanned` from `ast::Mac`Vadim Petrochenkov-4/+5
2019-08-14Rollup merge of #63542 - c410-f3r:node_ids, r=petrochenkovMazdak Farrokhzad-0/+3
Add NodeId for Arm, Field and FieldPat Extracted from #63468
2019-08-14Rollup merge of #63530 - ehuss:typo-statemement, r=centrilMazdak Farrokhzad-1/+1
Fix typo in error message.
2019-08-13Add NodeId for Arm, Field and FieldPatCaio-0/+3
2019-08-13Apply Centril's suggestionEric Huss-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-08-13Fix typo in error message.Eric Huss-1/+1
2019-08-12Bring back suggestion for splitting `<-` into `< -`Ilija Tovilo-0/+17
Closes #62632
2019-08-11parser: move into stmt.rsMazdak Farrokhzad-3/+2
2019-08-11parser: move parse_fn_block_decl into expr.rsMazdak Farrokhzad-9/+55
2019-08-11parser: split into expr.rsMazdak Farrokhzad-0/+1703