start incremental reparse

This commit is contained in:
Aleksey Kladov
2018-08-25 13:17:54 +03:00
parent 32c8ea9307
commit fed5727ea2
5 changed files with 46 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ fn expr_no_struct(p: &mut Parser) {
// fn b() { let _ = 1; }
// fn c() { 1; 2; }
// fn d() { 1; 2 }
pub(super) fn block(p: &mut Parser) {
pub(crate) fn block(p: &mut Parser) {
assert!(p.at(L_CURLY));
let m = p.start();
p.bump();

View File

@@ -1,10 +1,12 @@
use super::*;
mod consts;
mod structs;
mod traits;
mod use_item;
use super::*;
pub(crate) use self::structs::named_field_def_list;
// test mod_contents
// fn foo() {}
// macro_rules! foo {}

View File

@@ -82,7 +82,7 @@ fn enum_variant_list(p: &mut Parser) {
m.complete(p, ENUM_VARIANT_LIST);
}
fn named_field_def_list(p: &mut Parser) {
pub(crate) fn named_field_def_list(p: &mut Parser) {
assert!(p.at(L_CURLY));
let m = p.start();
p.bump();

View File

@@ -35,6 +35,10 @@ use {
parser_api::{Marker, CompletedMarker, Parser, TokenSet},
SyntaxKind::{self, *},
};
pub(crate) use self::{
expressions::block,
items::named_field_def_list,
};
pub(crate) fn file(p: &mut Parser) {
let file = p.start();