aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/grammar
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/grammar')
-rw-r--r--crates/libsyntax2/src/grammar/expressions/mod.rs2
-rw-r--r--crates/libsyntax2/src/grammar/items/mod.rs4
-rw-r--r--crates/libsyntax2/src/grammar/items/structs.rs2
-rw-r--r--crates/libsyntax2/src/grammar/mod.rs4
4 files changed, 9 insertions, 3 deletions
diff --git a/crates/libsyntax2/src/grammar/expressions/mod.rs b/crates/libsyntax2/src/grammar/expressions/mod.rs
index 59a0564d9..bd6c84886 100644
--- a/crates/libsyntax2/src/grammar/expressions/mod.rs
+++ b/crates/libsyntax2/src/grammar/expressions/mod.rs
@@ -25,7 +25,7 @@ fn expr_no_struct(p: &mut Parser) {
25// fn b() { let _ = 1; } 25// fn b() { let _ = 1; }
26// fn c() { 1; 2; } 26// fn c() { 1; 2; }
27// fn d() { 1; 2 } 27// fn d() { 1; 2 }
28pub(super) fn block(p: &mut Parser) { 28pub(crate) fn block(p: &mut Parser) {
29 assert!(p.at(L_CURLY)); 29 assert!(p.at(L_CURLY));
30 let m = p.start(); 30 let m = p.start();
31 p.bump(); 31 p.bump();
diff --git a/crates/libsyntax2/src/grammar/items/mod.rs b/crates/libsyntax2/src/grammar/items/mod.rs
index 206c85280..44ab92c63 100644
--- a/crates/libsyntax2/src/grammar/items/mod.rs
+++ b/crates/libsyntax2/src/grammar/items/mod.rs
@@ -1,10 +1,12 @@
1use super::*;
2 1
3mod consts; 2mod consts;
4mod structs; 3mod structs;
5mod traits; 4mod traits;
6mod use_item; 5mod use_item;
7 6
7use super::*;
8pub(crate) use self::structs::named_field_def_list;
9
8// test mod_contents 10// test mod_contents
9// fn foo() {} 11// fn foo() {}
10// macro_rules! foo {} 12// macro_rules! foo {}
diff --git a/crates/libsyntax2/src/grammar/items/structs.rs b/crates/libsyntax2/src/grammar/items/structs.rs
index ca027d718..93d3381f8 100644
--- a/crates/libsyntax2/src/grammar/items/structs.rs
+++ b/crates/libsyntax2/src/grammar/items/structs.rs
@@ -82,7 +82,7 @@ fn enum_variant_list(p: &mut Parser) {
82 m.complete(p, ENUM_VARIANT_LIST); 82 m.complete(p, ENUM_VARIANT_LIST);
83} 83}
84 84
85fn named_field_def_list(p: &mut Parser) { 85pub(crate) fn named_field_def_list(p: &mut Parser) {
86 assert!(p.at(L_CURLY)); 86 assert!(p.at(L_CURLY));
87 let m = p.start(); 87 let m = p.start();
88 p.bump(); 88 p.bump();
diff --git a/crates/libsyntax2/src/grammar/mod.rs b/crates/libsyntax2/src/grammar/mod.rs
index e3ca2714c..46ba8a89a 100644
--- a/crates/libsyntax2/src/grammar/mod.rs
+++ b/crates/libsyntax2/src/grammar/mod.rs
@@ -35,6 +35,10 @@ use {
35 parser_api::{Marker, CompletedMarker, Parser, TokenSet}, 35 parser_api::{Marker, CompletedMarker, Parser, TokenSet},
36 SyntaxKind::{self, *}, 36 SyntaxKind::{self, *},
37}; 37};
38pub(crate) use self::{
39 expressions::block,
40 items::named_field_def_list,
41};
38 42
39pub(crate) fn file(p: &mut Parser) { 43pub(crate) fn file(p: &mut Parser) {
40 let file = p.start(); 44 let file = p.start();