Aleksey Kladov
2785362a1f
Update crates/ra_parser/src/grammar/items.rs
2020-06-09 10:50:25 +02:00
Avi Dessauer
e38685cb48
Parse default unsafe fn
2020-06-08 17:49:06 -04:00
Avi Dessauer
c4fd463981
Move default const test out of line
2020-06-04 13:06:57 -04:00
Avi Dessauer
3ec2dcfc0d
Address review
2020-06-04 13:00:21 -04:00
Avi Dessauer
fb632c747d
Parse default unsafe & default const
2020-06-03 20:16:38 -04:00
Aleksey Kladov
359d3be308
Fix parsing of blocks without {
2020-05-02 14:35:17 +02:00
Edwin Cheng
45c4f620b1
Special-case try macro_rules
2020-04-30 22:07:46 +08:00
Aleksey Kladov
a1e1869554
Rename ast::ImplBlock -> ast::ImplDef
2020-02-29 21:33:15 +01:00
Kirill Bulatov
eceaf94f19
More manual clippy fixes
2020-02-18 16:12:37 +02:00
bors[bot]
8337dcd9e2
Merge #3047
...
3047: Update async unsafe fn ordering in parser r=matklad a=kiljacken
As of rust-lang/rust#61319 the correct order for functions that are both unsafe and async is: `async unsafe fn` and not `unsafe async fn`.
This commit updates the parser tests to reflect this, and corrects parsing behavior to accept the correct ordering.
Fixes #3025
Co-authored-by: Emil Lauridsen <mine809@gmail.com >
2020-02-07 13:21:02 +00:00
Emil Lauridsen
73ec2ab184
Update async unsafe fn ordering.
...
As of rust-lang/rust#61319 the correct order for functions that are both
unsafe and async is: `async unsafe fn` and not `unsafe async fn`.
This commit updates the parser tests to reflect this, and corrects
parsing behavior to accept the correct ordering.
Fixes #3025
2020-02-07 13:51:51 +01:00
Toby Dimmick
90ff2be4e8
PR tweaks
2020-02-07 12:36:33 +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
Edwin Cheng
737045c1ea
Use name instead of ident for macro 2.0 sytnax
2019-12-22 11:11:10 +08:00
Edwin Cheng
4195c0e5f9
Add macro keyword to ITEM_RECOVERY_SET
2019-12-21 18:42:17 +08:00
Edwin Cheng
bea8f58118
Add macro 2.0 support in parser
2019-12-21 18:29:14 +08:00
Aleksey Kladov
5fd68b5929
Fix hir for ast::UnionDef
2019-11-25 17:50:49 +03:00
Aleksey Kladov
e1c0bdaf75
Introduce dedicated AST node for union
...
Although structs and unions have the same syntax and differ only in
the keyword, re-using the single syntax node for both of them leads to
confusion in practice, and propagates further down the hir in an
upleasent way.
Moreover, static and consts also share syntax, but we use different
nodes for them.
2019-11-25 17:50:49 +03:00
Alexander Andreev
fdbd6bb11a
Added test for check doc strings in crates.
...
#1856
2019-09-30 11:58:53 +03:00
kjeremy
883edd002e
Replace usages of bump_any with bump
2019-09-19 15:51:46 -04:00
Dylan MacKenzie
253a18f938
Allow an underscore as the identifier in const items
2019-09-14 16:31:09 -07:00
Aleksey Kladov
40170885e7
WIP: switch to fully decomposed tokens internally
2019-09-10 15:46:39 +03:00
Aleksey Kladov
e2b378ef7e
rename bump -> bump_any
2019-09-10 01:00:38 +03:00
Aleksey Kladov
b2be998b7b
better error recovery for use trees
2019-09-05 19:53:07 +03:00
Aleksey Kladov
5b18a4eef9
rename struct -> record, pos -> tuple
2019-08-23 16:59:50 +03:00
Evgenii P
8222a1fddf
Fix is_path_start to accept T![<], fix is_path_start usages
2019-08-13 22:36:01 +07: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
zjy
de930237ff
fixed #1384
2019-06-28 15:22:17 +08:00
csmoe
d04473accb
fix: specialization(with blindly parsing)
...
Change-Id: Ic5d2767e8781568d76d4d0013cd6081e95ae8a95
2019-06-19 18:37:38 +08:00
csmoe
2ca9f71897
fix: support existential type
2019-06-12 14:32:39 +00: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
d436ab0581
Refactor parser handle mult-char punct internally
2019-04-28 23:46:03 +08:00
robojumper
636270f4a4
Parse unsafe async / const unsafe fns properly
2019-04-03 17:11:56 +02: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
76075c7410
Use Marker argument for item parsers
...
- Fix pub_expr
- Fix incorrect parsing of crate::path
2019-03-18 14:34:08 +09:00
pcpthm
3d9c2beb8e
Apply stylistic changes suggested
2019-03-18 13:14:47 +09:00
pcpthm
e570267515
Refactor maybe_item to use Marker argument
2019-03-17 22:04:25 +09:00
Caio
cc9721996c
Add test for async block
2019-03-10 14:35:25 -03:00
Caio
ad72699553
Add async keyword
2019-03-09 20:40:22 -03:00
Aleksey Kladov
78f10fcdc4
rename type to type_alias in the AST as well
2019-02-25 13:49:32 +03:00
Aleksey Kladov
d334b5a1db
move parser to a separate crate
2019-02-21 13:27:45 +03:00