Aleksey Kladov
75761c0e47
add rustc_lexer
2019-07-22 17:47:33 +03:00
Unreal Hoang
3a7f07c62d
add await to syntax, parser for await_expr
2019-07-20 17:41:31 +09:00
Aleksey Kladov
deab4caa7b
make Parse fields private
...
this is in preparation for the new rowan API
2019-07-12 19:41:13 +03:00
Aleksey Kladov
1834bae5b8
allow rustfmt to reorder imports
...
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
2019-07-04 23:09:09 +03: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
Aleksey Kladov
2e722ec54b
show error offsets in tests
2019-05-29 10:31:07 +03:00
Aleksey Kladov
0efbcdf435
remove old parsing methods
2019-05-28 17:34:28 +03:00
Aleksey Kladov
310bfe57bd
update test data
2019-05-28 17:09:45 +03:00
Aleksey Kladov
bc2550b196
update tests
2019-05-28 16:59:22 +03:00
Aleksey Kladov
313314e14b
share literal validation logic with compiler
2019-05-07 19:41:59 +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
Edwin Cheng
6c913d8fa7
Add ...
parsing for fn pointer type
2019-04-23 11:10:41 +08:00
Aleksey Kladov
20013de2ab
fix typo
2019-04-11 17:15:20 +03: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
Aleksey Kladov
7d6bd5d137
always show token text
2019-04-02 14:49:46 +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
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
245c0d8584
Update tests
2019-03-31 10:39:23 +03:00
Ville Penttinen
bfc2ac90c8
Update tests
2019-03-30 17:11:46 +02:00
Ville Penttinen
444a119220
Fix parsing <= in type_args
2019-03-30 13:52:47 +02:00
memoryruins
c7264b4f07
add test for async blocks
2019-03-28 18:54:06 -04:00
memoryruins
7a06282d71
Add tests to ra_syntax for extern_crate_self
2019-03-28 12:15:44 -04:00
Ville Penttinen
95505e80fc
Support references in higher-ranked trait bounds
...
Fixes #1020
2019-03-24 20:51:55 +02:00
Aleksey Kladov
4fd8cfd6ad
replace todo with fixme
2019-03-23 11:07:09 +03:00
pcpthm
bf8e7930da
Fix reparsing failure when removing newline
2019-03-22 08:09:11 +09:00
pcpthm
edbc18516d
Fix reparsing bug on "{}{}"
2019-03-22 08:09:11 +09:00
pcpthm
ec59d9bda5
Fix lexer not producing right token on "_"
2019-03-22 08:09:11 +09:00
pcpthm
9623e77d9f
Fix reparsing bug when lex result is different
2019-03-22 08:09:11 +09:00
pcpthm
0acb61a911
Fix an arithmetic overflow in reparser
2019-03-22 08:09:11 +09:00
pcpthm
4c7142d0c9
Add fuzz test for reparsing
2019-03-22 08:04:48 +09:00
pcpthm
e734190c24
Refactor parser fuzz testing
2019-03-22 08:04:48 +09:00
pcpthm
2fb110e1fa
Error about attributes on
...
unallowed types of expression statement
2019-03-19 17:37:08 +09: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
bors[bot]
1cd18f9237
Merge #991
...
991: Use Marker argument for item parsers r=matklad a=pcpthm
Before doing this for expressions, I found that the pattern (Marker argument) should be applied to the item parsers because visiblity and modifiers are parsed in a separate function.
Fixed some parser bugs:
- Fix pub_expr: `pub 42;` was allowed.
- Fix incorrect parsing of crate::path: incorrectly parsed as `crate` as a visibility.
Co-authored-by: pcpthm <pcpthm@gmail.com>
2019-03-18 09:32:28 +00: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