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
bors[bot]
978e3e384b
Merge #1636
...
1636: fix block parse problem r=matklad a=bravomikekilo
try to fix [issue-1598](https://github.com/rust-analyzer/rust-analyzer/issues/1598 ).
Co-authored-by: bravomikekilo <bmk1221@126.com>
2019-08-13 12:46:47 +00:00
bravomikekilo
eb0e9bd981
add inline test
2019-08-13 18:17:10 +08:00
Aleksey Kladov
f3ee5a1509
Move numeric names inside of NameRef
2019-08-09 12:16:47 +02:00
Evgenii P
fa24e20867
Make name_ref to accept numeric names optionally
2019-08-09 16:08:36 +07:00
Evgenii P
957b5ed23a
Parse tuple struct field initialization
2019-08-09 15:38:52 +07:00
bors[bot]
87608904f6
Merge #1661
...
1661: Parse function parameters attributes r=matklad a=eupn
Fixes #1397 . The [RFC-2565](https://github.com/rust-lang/rfcs/blob/master/text/2565-formal-function-parameter-attributes.md ) specifies `#[attributes]` to function parameters:
```rust
fn foo(#[attr] a, #[unused] b, #[must_use] ...) {
// ...
}
```
This PR adds those attributes into grammar and to the parser, extending corresponding inline tests.
Co-authored-by: Evgenii P <eupn@protonmail.com>
2019-08-08 13:04:28 +00:00
Evgenii P
6fa2d82147
Fix parser tests according to review
2019-08-08 09:12:07 +07:00
Evgenii P
77f4ab3e9b
Deduplicate while loop break condition
2019-08-08 08:58:28 +07:00
Aleksey Kladov
d6ab1af086
assoc types bounds
2019-08-07 21:00:02 +02:00
Evgenii P
79d4202194
Fix parser to correctly consume outer attrs before ellipsis param
2019-08-08 00:36:19 +07:00
Evgenii P
9ea36703d2
Fix variadic arg inline test
2019-08-07 23:48:21 +07:00
Evgenii P
3fb58c620c
Add function parameters attributes
2019-08-07 23:42:28 +07:00
bravomikekilo
562359d706
fix block parse problem
2019-08-03 19:57:07 +08:00
csmoe
8fe58c3598
fix: parse box syntax inside parentheses
2019-07-22 20:52:10 +08:00
Unreal Hoang
3a7f07c62d
add await to syntax, parser for await_expr
2019-07-20 17:41:31 +09: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
zjy
de930237ff
fixed #1384
2019-06-28 15:22:17 +08:00
bors[bot]
67ecc88f66
Merge #1415
...
1415: fix: specialization r=matklad a=csmoe
Closes #1402
r? @matklad
Co-authored-by: csmoe <csmoe@msn.com>
2019-06-24 10:10:05 +00:00
csmoe
d04473accb
fix: specialization(with blindly parsing)
...
Change-Id: Ic5d2767e8781568d76d4d0013cd6081e95ae8a95
2019-06-19 18:37:38 +08:00
csmoe
d6533994e4
fix: box_pattern
...
Change-Id: I45a856d74fb616d3bce33050f9e69d327186bd59
2019-06-19 14:28:50 +08:00
csmoe
5999733ca6
fix: box_syntax( #1412 )
...
Change-Id: I6e20e0163fa545de37226c1561b3b7103615626c
2019-06-18 21:46:47 +08:00
csmoe
2ca9f71897
fix: support existential type
2019-06-12 14:32:39 +00:00
csmoe
205a8278a9
fix: never type with binding
...
Change-Id: I14e1bc628b9d2dfdb1f40de3d3707f4e872767f2
2019-06-07 19:49:49 +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
Alan Du
4e449fb0b0
Fix clippy::if_same_then_else
2019-06-04 18:05:07 -04:00
Aleksey Kladov
0270b4bc57
reformat
2019-05-24 01:48:44 +03:00
Sergey Parilin
993abedd77
apply T! macro where it is possible
2019-05-15 15:35:47 +03:00
Edwin Cheng
b454eb5a60
Add macro pat parsing
2019-04-30 23:22:48 +08:00
Edwin Cheng
d436ab0581
Refactor parser handle mult-char punct internally
2019-04-28 23:46:03 +08:00
kjeremy
d8649c1af8
Simplify
2019-04-26 11:42:56 -04:00
Edwin Cheng
6c913d8fa7
Add ...
parsing for fn pointer type
2019-04-23 11:10:41 +08:00
Edwin Cheng
c0f19d7005
Add expr, pat, ty and macro_stmts
2019-04-19 03:49:56 +08:00
Edwin Cheng
57e4122b89
Add mbe stmt matcher
2019-04-17 12:34:43 +08:00
Edwin Cheng
6646d49f23
Fix bug and add expr , pat , ty matcher
2019-04-14 11:42:20 +08:00
robojumper
ca40ca93a5
Parse and infer tuple indices
2019-04-06 01:07:35 +02:00
robojumper
636270f4a4
Parse unsafe async / const unsafe fns properly
2019-04-03 17:11:56 +02: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
Ville Penttinen
3f62ab8f51
Add WherePred to allow predicate access in WhereClause
...
This also unifies parsing of WHERE_PRED bounds, now Lifetime bounds will also be
parsed using TYPE_BOUND_LIST
2019-03-31 13:20:56 +03:00
bors[bot]
4666138c91
Merge #1072
...
1072: recognize async move blocks r=matklad a=memoryruins
closes #1053
Co-authored-by: memoryruins <memoryruinsmusic@gmail.com>
2019-03-31 09:18:21 +00:00
Ville Penttinen
98cff6ecec
Change parsing bounds in path_types
...
Now bounds inside a path are parsed as DYN_TRAIT_TYPE, previously they would be
parsed as `PATH_TYPE` followed by `TYPE_BOUND_LIST`.
Basically this means `Box<T + 'f>` is now parsed almost the same as
`Box<dyn T + 'f>` with the exception of not having the `dyn` keyword.
2019-03-31 10:38:36 +03:00
Ville Penttinen
e3f9d6555b
Move parsing a single TYPE_BOUND to a separate function
2019-03-30 17:23:54 +02:00
Ville Penttinen
23fdc562bf
Add new TYPE_BOUND_LIST and TYPE_BOUND syntax kinds
...
These are now used when parsing type bounds. In addition parsing paths inside a
bound now does not recursively parse paths, rather they are treated as separate
bounds, separated by +.
2019-03-30 17:11:21 +02:00
Ville Penttinen
444a119220
Fix parsing <= in type_args
2019-03-30 13:52:47 +02:00
memoryruins
abe96a4765
recognize async move
2019-03-28 18:38:59 -04:00