Fix parsing of blocks without {

This commit is contained in:
Aleksey Kladov 2020-05-02 14:34:39 +02:00
parent fb8fb65131
commit 359d3be308
11 changed files with 107 additions and 62 deletions

View file

@ -54,7 +54,7 @@ pub(crate) mod fragments {
use super::*;
pub(crate) use super::{
expressions::block, paths::type_path as path, patterns::pattern, types::type_,
expressions::block_expr, paths::type_path as path, patterns::pattern, types::type_,
};
pub(crate) fn expr(p: &mut Parser) {
@ -143,7 +143,7 @@ pub(crate) fn reparser(
parent: Option<SyntaxKind>,
) -> Option<fn(&mut Parser)> {
let res = match node {
BLOCK_EXPR => expressions::block,
BLOCK_EXPR => expressions::block_expr,
RECORD_FIELD_DEF_LIST => items::record_field_def_list,
RECORD_FIELD_LIST => items::record_field_list,
ENUM_VARIANT_LIST => items::enum_variant_list,