Commit graph

1014 commits

Author SHA1 Message Date
Daniel McNab
80eefcbc05 Add cargo gen-kinds documentation 2018-10-04 21:43:58 +01:00
bors[bot]
7a025ad201 Merge #93
93: Support leading pipe in match arms r=matklad a=DJMcNab

This adds support for match arms of the form:
```rust
<...>
| X | Y => <...>,
| X => <...>,
| 1..2 => <...>,
etc
```

# Implementation discussion

This just naïvely 'eats' a leading pipe if one is available. The equivalent line in the reference `libsyntax` is in [`parse_arm`](441519536c/src/libsyntax/parse/parser.rs (L3552)).

As noted in the comment linked above, this feature was formally introduced as a result of rust-lang/rfcs#1925. This feature is in active use in the [`rust-analyzer` codebase](c87fcb4ea5/crates/ra_syntax/src/syntax_kinds/generated.rs (L231))

I have added some tests for this feature, but maybe more would be required

EDIT: Always looking for feedback - is this PR description over-engineered?

Co-authored-by: Daniel McNab <36049421+djmcnab@users.noreply.github.com>
2018-10-04 07:02:19 +00:00
Daniel McNab
a55ef9b3ed Support leading pipe in match arms 2018-10-03 21:47:03 +01:00
Aleksey Kladov
1a2a8dec14 Make siblings an inherent method 2018-10-02 18:14:33 +03:00
Aleksey Kladov
d323c81d5c make ancestors and descendants inherent 2018-10-02 18:02:57 +03:00
Aleksey Kladov
dccaa5e45e use aliases 2018-10-02 17:50:56 +03:00
Aleksey Kladov
a261a1836b Move to rowan for syntax tree impl 2018-10-02 17:09:23 +03:00
Aleksey Kladov
baaf027da0 support 2018 paths 2018-09-29 14:53:23 +03:00
csmoe
8b710e9535 generate testsuite for impl_type 2018-09-26 16:53:16 +08:00
csmoe
edf1cc3582 parse impl type 2018-09-25 22:21:16 +08:00
csmoe
cacb32d88a reject impl keyword in impl header 2018-09-24 11:44:43 +08:00
csmoe
e446316585 add test for impl recovery 2018-09-24 11:44:43 +08:00
Aleksey Kladov
d6c7030aeb Add emacs function for extend shirnk selection 2018-09-19 00:46:10 +03:00
Aleksey Kladov
b5021411a8 rename all things 2018-09-16 13:07:39 +03:00