diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-01-16 15:49:23 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-16 15:49:23 +0000 |
commit | e614356de10256c64e02f5d0f82cfa39e27b0f07 (patch) | |
tree | 1ad38d73f8cac5a82e1cb9493016b645a335074a /crates/ra_parser/src/grammar/expressions.rs | |
parent | f4eeff2c82e7d8b95706c2bcb0388eeeb3ddd24e (diff) | |
parent | a766883a751096e5b912b59a14d7b6fc3372c791 (diff) |
Merge #2827
2827: Fix array element attribute position r=matklad a=edwin0cheng
This PR fixed a bug which an ATTR node insert in the wrong place in array element. ~~And introduce `precede_next` for allow outer attributes to insert into a parsed `expr`.~~
related #2783
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_parser/src/grammar/expressions.rs')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index 81d4f75f9..d733499d1 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -14,9 +14,9 @@ pub(super) enum StmtWithSemi { | |||
14 | 14 | ||
15 | const EXPR_FIRST: TokenSet = LHS_FIRST; | 15 | const EXPR_FIRST: TokenSet = LHS_FIRST; |
16 | 16 | ||
17 | pub(super) fn expr(p: &mut Parser) -> BlockLike { | 17 | pub(super) fn expr(p: &mut Parser) -> (Option<CompletedMarker>, BlockLike) { |
18 | let r = Restrictions { forbid_structs: false, prefer_stmt: false }; | 18 | let r = Restrictions { forbid_structs: false, prefer_stmt: false }; |
19 | expr_bp(p, r, 1).1 | 19 | expr_bp(p, r, 1) |
20 | } | 20 | } |
21 | 21 | ||
22 | pub(super) fn expr_stmt(p: &mut Parser) -> (Option<CompletedMarker>, BlockLike) { | 22 | pub(super) fn expr_stmt(p: &mut Parser) -> (Option<CompletedMarker>, BlockLike) { |