Aleksey Kladov
359d3be308
Fix parsing of blocks without {
2020-05-02 14:35:17 +02:00
Aleksey Kladov
623faefcda
Cleanup inline tests
2020-05-02 11:21:39 +02:00
Aleksey Kladov
4f2134cc33
Introduce EffectExpr
2020-05-02 11:21:39 +02:00
Aleksey Kladov
fd030f9450
Revert "Merge #4233 "
...
This reverts commit a5f2b16366
, reversing
changes made to c96b2180c1
.
2020-05-02 01:12:37 +02:00
Aleksey Kladov
292ba6a1f8
Remove dead code, which elaborately pretends to be alive
2020-04-30 22:41:14 +02:00
Aleksey Kladov
c51c8bfb84
Special-case try macro to better support 2015 edition
2020-04-30 14:17:14 +02:00
Aleksey Kladov
f6188caaa0
Fix parsing lambdas with return type
...
We should eat only a single block, and not whatever larger expression
may start with a block.
closes #3721
2020-03-25 17:01:28 +01:00
Florian Diebold
e6ec4a329f
Better fix for stuck parser?
2020-03-16 18:38:19 +01:00
Florian Diebold
c32529ddd0
Get tests working
2020-03-16 18:38:19 +01:00
Kirill Bulatov
b8ddcb0652
Run cargo +nightly fix --clippy -Z unstable-options
2020-02-18 16:03:08 +02:00
Matthew Jasper
8c8d0bb34f
Add or- and parenthesized-patterns
2020-02-09 22:06:15 +00:00
Toby Dimmick
7e66785859
Rework value parameter parsing
...
- `Fn__(...)` parameters with idents/patterns no longer parse
- Trait function parameters with arbitrary patterns parse
- Trait function parameters without idents/patterns no longer parse
- `fn(...)` parameters no longer parse with patterns other than a single ident
2020-02-06 19:45:51 +00:00
Aleksey Kladov
b7c45fba57
Extract expr_with_attrs
2020-01-17 11:44:40 +01:00
Aleksey Kladov
5398b9eeba
Minimize test
2020-01-16 18:39:29 +01:00
Aleksey Kladov
ab0a11b1de
Simplify array parsing
2020-01-16 18:35:03 +01:00
Edwin Cheng
ed8d5c86e3
Fix array element attribute position
2020-01-16 23:37:43 +08:00
Aleksey Kladov
0ed8ce096d
Touch up TokenSet a bit
2019-12-19 17:13:33 +01:00
Aleksey Kladov
5c3c2b8690
Fix parsing of interpolated expressions
2019-12-19 14:43:19 +01:00
Aleksey Kladov
3e2f4e4293
Improve recovery for incomplete lambdas
2019-12-17 12:11:01 +01:00
Aleksey Kladov
ef02296b9f
Simplify parsing
2019-11-14 17:36:27 +03:00
Aleksey Kladov
5a6db3ca29
fix parsing of for loops inside expressions
...
closes #2051
2019-10-28 15:41:34 +03:00
Geoffry Song
9638adaa40
Fix parsing of block expressions in "forbid_structs" contexts.
...
Forbidding block expressions entirely is too strict; instead, we should only
forbid them in contexts where we are parsing an optional RHS (i.e. the RHS of a
range expression).
2019-10-03 00:39:52 -07:00
Alexander Andreev
fdbd6bb11a
Added test for check doc strings in crates.
...
#1856
2019-09-30 11:58:53 +03:00
kjeremy
fef7fcf5a9
Support loop as argument
2019-09-20 16:35:29 -04:00
kjeremy
883edd002e
Replace usages of bump_any with bump
2019-09-19 15:51:46 -04:00
Aleksey Kladov
b9d9db83d1
cleanup dollar handling in expressions
2019-09-10 21:28:27 +03:00
Aleksey Kladov
e2b378ef7e
rename bump -> bump_any
2019-09-10 01:00:38 +03:00
Aleksey Kladov
3c2dea7f55
always wrap block into an expression
2019-09-02 20:15:51 +03:00
Dylan MacKenzie
83433cd1f0
Centralize box
pattern tests in patterns.rs
2019-08-23 16:19:53 -07:00
Dylan MacKenzie
3e14b16c4d
Add test for nested box pattern
2019-08-22 12:53:54 -07:00
bors[bot]
5ed6a13a2c
Merge #1685
...
1685: fix error of RangeFrom in for-loop r=DJMcNab a=bravomikekilo
fix [issue-1542](https://github.com/rust-analyzer/rust-analyzer/issues/1542 ) @matklad
Co-authored-by: bravomikekilo <bmk1221@126.com>
2019-08-15 05:49:13 +00:00
bravomikekilo
4f31fed362
fix test position
2019-08-14 21:20:04 +08:00
bravomikekilo
2bebdf0b37
fix error of RangeFrom in for-loop
2019-08-14 11:55:21 +08:00
Evgenii P
8222a1fddf
Fix is_path_start to accept T![<], fix is_path_start usages
2019-08-13 22:36:01 +07:00
csmoe
8fe58c3598
fix: parse box syntax inside parentheses
2019-07-22 20:52:10 +08:00
Ryan Cumming
2959aa446e
Remove parse error on array initializer attributes
...
This is actually allowed by the `rustc` parser but most attributes will
fail later due to attributes on expressions being experimental.
2019-06-30 19:55:50 +10:00
Ryan Cumming
b01496538c
Support attributes on array members
...
Array members are allow to have attributes such as `#[cfg]`.
This is a bit tricky as we don't know if the first expression is an
initializer or a member until we encounter a `;`. This reuses a trick
from `stmt` where we remember if we saw an attribute and then raise an
error if the first expression ends up being an initializer.
This isn't perfect as the error isn't correctly located on the attribute
or initializer; it ends up immediately after the `;`.
2019-06-30 18:36:54 +10:00
csmoe
d6533994e4
fix: box_pattern
...
Change-Id: I45a856d74fb616d3bce33050f9e69d327186bd59
2019-06-19 14:28:50 +08:00
Andrey Tkachenko
505b8d873f
[ #1083 ] Try block syntax: fix tests
2019-06-06 16:26:54 +04:00
Andrey Tkachenko
281c9eeaff
[ #1083 ] Try block syntax
2019-06-06 15:43:26 +04:00
Sergey Parilin
993abedd77
apply T! macro where it is possible
2019-05-15 15:35:47 +03:00
bors[bot]
56f3524c69
Merge #1082
...
1082: Async block in argument position r=matklad a=andreytkachenko
Fixes case when async block appears in argument position
Co-authored-by: Andrey Tkachenko <andreytkachenko64@gmail.com>
2019-04-01 11:22:13 +00:00
Andrey Tkachenko
e89b97524a
Async block in argument position
2019-04-01 15:15:41 +04:00
robojumper
d43dff43b4
Async closure syntax
2019-03-31 16:35:22 +02:00
memoryruins
abe96a4765
recognize async move
2019-03-28 18:38:59 -04:00
pcpthm
ffed132e52
Allow attributes on top level expression
...
A top level expression is either
- a expression statement or
- the last expression in a block
2019-03-19 17:24:02 +09:00
pcpthm
a67fe4ea7e
Fix parse tree of attribute on match arm
2019-03-17 20:57:27 +09:00
Caio
ad72699553
Add async keyword
2019-03-09 20:40:22 -03:00
Ville Penttinen
eb1ac43867
Introduce pattern_list to parse pipe separated patterns
...
pattern_list comes in two variants, one uses the default PAT_RECOVERY_SET as the
recovery set, while other allows the user to provide a recovery set.
2019-03-05 11:31:25 +02:00
Ville Penttinen
1f4468a8da
Add support for parsing multiple if and while-let patterns
2019-03-04 19:10:14 +02:00