about summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
AgeCommit message (Collapse)AuthorLines
2019-08-27Cleanup: Consistently use `Param` instead of `Arg` #62426Kevin Per-9/+9
2019-08-25pprust: Do not print spaces before some tokensVadim Petrochenkov-1/+13
2019-08-17initial implementation of or-pattern parsingDan Robertson-35/+12
Initial implementation of parsing or-patterns e.g., `Some(Foo | Bar)`. This is a partial implementation of RFC 2535.
2019-08-17Initial implementation of or patternsvarkor-2/+31
2019-08-15`Ident::with_empty_ctxt` -> `Ident::with_dummy_span`Vadim Petrochenkov-3/+3
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.
2019-08-15Remove `Spanned` from `{ast,hir}::FieldPat`Vadim Petrochenkov-4/+4
2019-08-15Remove `Spanned` from `ast::Mac`Vadim Petrochenkov-7/+7
2019-08-14Merge Variant and Variant_Caio-3/+3
2019-08-06Rollup merge of #63272 - Mark-Simulacrum:clean-attr, r=petrochenkovMazdak Farrokhzad-3/+2
Some more libsyntax::attr cleanup Much smaller patch than the last one, mostly just finishing up by removing some Span arguments. r? @petrochenkov
2019-08-05Drop span argument from mk_list_itemMark Rousskov-3/+2
2019-08-05add unknown tokenAleksey Kladov-0/+1
2019-08-04Rename `ItemImplKind::Type` to `ItemImplKind::TyAlias`varkor-1/+1
2019-08-04Rename `ItemKind::Ty` to `ItemKind::TyAlias`varkor-1/+1
2019-08-03Rollup merge of #63146 - Mark-Simulacrum:clean-attr, r=petrochenkovMazdak Farrokhzad-2/+2
Cleanup syntax::attr Mostly removing needless arguments to constructors r? @petrochenkov
2019-08-03Auto merge of #63180 - varkor:trait-alias-impl-trait, r=Centrilbors-5/+9
Change opaque type syntax from `existential type` to type alias `impl Trait` This implements a new feature gate `type_alias_impl_trait` (this is slightly different from the originally proposed feature name, but matches what has been used in discussion since), deprecating the old `existential_types` feature. The syntax for opaque types has been changed. In addition, the "existential" terminology has been replaced with "opaque", as per previous discussion and the RFC. This makes partial progress towards implementing https://github.com/rust-lang/rust/issues/63063. r? @Centril
2019-08-03Rollup merge of #63212 - Centril:param-attrs-pretty, r=davidtwcoMazdak Farrokhzad-10/+9
Pretty print attributes in `print_arg` Fixes https://github.com/rust-lang/rust/issues/63210. cc https://github.com/rust-lang/rust/issues/60406 r? @petrochenkov
2019-08-02Print outer attributes on formal params.Mazdak Farrokhzad-0/+3
2019-08-02Cleanup 'print_generic_params'.Mazdak Farrokhzad-10/+6
2019-08-02Replace "existential" by "opaque"varkor-5/+9
2019-08-02Remove some more `cfg(test)`sVadim Petrochenkov-20/+0
2019-08-02libsyntax: Unconfigure tests during normal buildVadim Petrochenkov-57/+3
2019-07-31Remove span argument from mk_attr_{inner,outer}Mark Rousskov-2/+2
Always the same as the passed MetaItem
2019-07-31Remove AttrId from Attribute constructorsMark Rousskov-2/+2
2019-07-30Unsupport the await!(..) macro.Mazdak Farrokhzad-11/+3
2019-07-28Rollup merge of #62550 - Centril:rest-patterns, r=petrochenkovMazdak Farrokhzad-47/+9
Implement RFC 2707 + Parser recovery for range patterns Implement https://github.com/rust-lang/rfcs/pull/2707. - Add a new basic syntactic pattern form `ast::PatKind::Rest` (parsed as `..` or `DOTDOT`) and simplify `ast::PatKind::{Slice, Tuple, TupleStruct}` as a result. - Lower `ast::PatKind::Rest` in combination with the aforementioned `PatKind` variants as well as `PatKind::Ident`. The HIR remains unchanged for now (may be advisable to make slight adjustments later). - Refactor `parser.rs` wrt. parsing sequences and lists of things in the process. - Add parser recovery for range patterns of form `X..`, `X..=`, `X...`, `..Y`, `..=Y`, and `...Y`. This should make it easy to actually support these patterns semantically later if we so desire. cc https://github.com/rust-lang/rust/issues/62254 r? @petrochenkov
2019-07-28Adjust pretty printing accordingly.Mazdak Farrokhzad-47/+8
2019-07-28Add 'ast::PatKind::Rest'.Mazdak Farrokhzad-0/+1
2019-07-27Move standard library injection into libsyntax_extVadim Petrochenkov-2/+1
2019-07-15pprust: Support `macro` macrosVadim Petrochenkov-8/+23
2019-07-15pprust: Fix formatting regressions from the previous commitsVadim Petrochenkov-10/+13
Fix some remaining cases of bad formatting Update some failing tests
2019-07-15pprust: Do not convert attributes into `MetaItem`s for printingVadim Petrochenkov-15/+11
Fixes https://github.com/rust-lang/rust/issues/62628
2019-07-15pprust: Remove the box from `print_tts`Vadim Petrochenkov-2/+4
Wrap the whole attribute into a box instead
2019-07-15pprust: Use `print_mac_common` for delimited token groupsVadim Petrochenkov-27/+33
2019-07-15pprust: Use `print_mac_common` for attributesVadim Petrochenkov-4/+18
2019-07-15pprust: Use `print_mac_common` for `macro_rules` definitionsVadim Petrochenkov-26/+16
2019-07-15pprust: Move some methods to the `PrintState` traitVadim Petrochenkov-135/+132
So that path and macro argument printing code can be shared
2019-07-12Use snippet instead of pprinting statementEsteban Küber-2/+1
2019-07-11Address review commentsVadim Petrochenkov-9/+10
2019-07-11pretty-print: Merge `print_tts` and `print_tts_ext`Vadim Petrochenkov-10/+6
2019-07-11pretty-print: Do not lose the `$crate` printing flag in `print_tt`Vadim Petrochenkov-1/+1
2019-07-10File is now short enough for tidyMark Rousskov-2/+0
2019-07-10Remove writer function from PrintStateMark Rousskov-37/+32
2019-07-10Use constant instead of magic numberMark Rousskov-1/+1
2019-07-10Remove needless indent argumentsMark Rousskov-11/+8
We're always indenting by INDENT_UNIT anyway
2019-07-10Move pp::Printer helpers to direct implMark Rousskov-42/+12
2019-07-10Rename is_bol -> is_beginning_of_lineMark Rousskov-9/+4
Also moves it to pp::Printer from PrintState.
2019-07-10Remove needless indirection in bcloseMark Rousskov-6/+2
2019-07-10Drop length from Token::StringMark Rousskov-1/+1
It was always set to the string's length
2019-07-10Remove is_begin/is_end functions from PrintStateMark Rousskov-16/+4
These are somewhat ambiguous (beginning/end of what?) so it's better to inline their one use into the code.
2019-07-10Move pp::Printer out field to owned StringMark Rousskov-19/+13
This enforces that eof() must be called to get the String out, and generally is better from an API perspective. No users of pretty printing pre-allocate the buffer.