mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Implement reparsing for remaining blocks
This commit is contained in:
parent
4f64709666
commit
64d07c1bd4
9 changed files with 93 additions and 28 deletions
|
@ -287,7 +287,7 @@ fn match_expr(p: &mut Parser) -> CompletedMarker {
|
|||
m.complete(p, MATCH_EXPR)
|
||||
}
|
||||
|
||||
fn match_arm_list(p: &mut Parser) {
|
||||
pub(crate) fn match_arm_list(p: &mut Parser) {
|
||||
assert!(p.at(L_CURLY));
|
||||
let m = p.start();
|
||||
p.eat(L_CURLY);
|
||||
|
|
|
@ -2,6 +2,7 @@ mod atom;
|
|||
|
||||
use super::*;
|
||||
pub(super) use self::atom::{literal, LITERAL_FIRST};
|
||||
pub(crate) use self::atom::match_arm_list;
|
||||
|
||||
const EXPR_FIRST: TokenSet = LHS_FIRST;
|
||||
|
||||
|
@ -419,7 +420,7 @@ fn path_expr(p: &mut Parser, r: Restrictions) -> CompletedMarker {
|
|||
// S { x, y: 32, };
|
||||
// S { x, y: 32, ..Default::default() };
|
||||
// }
|
||||
fn named_field_list(p: &mut Parser) {
|
||||
pub(crate) fn named_field_list(p: &mut Parser) {
|
||||
assert!(p.at(L_CURLY));
|
||||
let m = p.start();
|
||||
p.bump();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue