diff options
Diffstat (limited to 'crates/libsyntax2/src/grammar')
-rw-r--r-- | crates/libsyntax2/src/grammar/expressions/mod.rs | 2 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar/items/mod.rs | 4 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar/items/structs.rs | 2 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar/mod.rs | 4 |
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 } |
28 | pub(super) fn block(p: &mut Parser) { | 28 | pub(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 @@ | |||
1 | use super::*; | ||
2 | 1 | ||
3 | mod consts; | 2 | mod consts; |
4 | mod structs; | 3 | mod structs; |
5 | mod traits; | 4 | mod traits; |
6 | mod use_item; | 5 | mod use_item; |
7 | 6 | ||
7 | use super::*; | ||
8 | pub(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 | ||
85 | fn named_field_def_list(p: &mut Parser) { | 85 | pub(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 | }; |
38 | pub(crate) use self::{ | ||
39 | expressions::block, | ||
40 | items::named_field_def_list, | ||
41 | }; | ||
38 | 42 | ||
39 | pub(crate) fn file(p: &mut Parser) { | 43 | pub(crate) fn file(p: &mut Parser) { |
40 | let file = p.start(); | 44 | let file = p.start(); |