about summary refs log tree commit diff
path: root/compiler/rustc_parse
AgeCommit message (Collapse)AuthorLines
2020-09-01Remove trivia tokensAleksey Kladov-8/+1
2020-09-01Don't emit trivia tokensAleksey Kladov-73/+56
2020-08-31Make StringReader privateAleksey Kladov-3/+3
After the recent refactorings, we can actually completely hide this type. It should help with #63689.
2020-08-31Rollup merge of #76115 - calebcartwright:parser-fn-visibility, r=matkladAleksey Kladov-2/+4
Restore public visibility on some parsing functions for rustfmt In #74826 the visibility of several parsing functions was reduced. However, rustfmt is an external consumer of some of these functions as well and needs the visibility to be public, similar to other elements in rustc_parse such as `parse_ident` https://github.com/rust-lang/rust/blob/db534b3ac286cf45688c3bbae6aa6e77439e52d2/src/librustc_parse/parser/mod.rs#L433-L436
2020-08-31Rollup merge of #76050 - matklad:pos, r=petrochenkovAleksey Kladov-4/+0
Remove unused function
2020-08-30Factor out StmtKind::MacCall fields into `MacCallStmt` structAaron Hill-2/+2
In PR #76130, I add a fourth field, which makes using a tuple variant somewhat unwieldy.
2020-08-30Use string literal directly when available in formatSasha-1/+1
Previous implementation used the `Parser::parse_expr` function in order to extract the format expression. If the first comma following the format expression was mistakenly replaced with a dot, then the next format expression was eaten by the function, because it looked as a syntactically valid expression, which resulted in incorrectly spanned error messages. The way the format expression is exctracted is changed: we first look at the first available token in the first argument supplied to the `format!` macro call. If it is a string literal, then it is promoted as a format expression immediatly, otherwise we fall back to the original `parse_expr`-related method. This allows us to ensure that the parser won't consume too much tokens when a typo is made. A test has been created so that it is ensured that the issue is properly fixed.
2020-08-30parser: restore some fn visibility for rustfmtCaleb Cartwright-2/+4
2020-08-30Remove unused functionAleksey Kladov-4/+0
2020-08-30mv compiler to compiler/mark-0/+12707