diff options
author | Aleksey Kladov <[email protected]> | 2019-01-31 19:14:28 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-31 20:23:30 +0000 |
commit | b4b522fb3952fae365e02ffdc6ef05c8d75b7674 (patch) | |
tree | 8ae249dc026b71d91b0ce066d5fc0e2e146247eb /crates/ra_mbe/src/mbe_parser.rs | |
parent | a16f6bb27df1a9a9fcb506081bb30ccbf966e5c2 (diff) |
cleanup the api
Diffstat (limited to 'crates/ra_mbe/src/mbe_parser.rs')
-rw-r--r-- | crates/ra_mbe/src/mbe_parser.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_mbe/src/mbe_parser.rs b/crates/ra_mbe/src/mbe_parser.rs index a76ea84db..a3e6abffc 100644 --- a/crates/ra_mbe/src/mbe_parser.rs +++ b/crates/ra_mbe/src/mbe_parser.rs | |||
@@ -1,10 +1,9 @@ | |||
1 | use crate::tt_cursor::TtCursor; | ||
2 | |||
3 | /// This module parses a raw `tt::TokenStream` into macro-by-example token | 1 | /// This module parses a raw `tt::TokenStream` into macro-by-example token |
4 | /// stream. This is a *mostly* identify function, expect for handling of | 2 | /// stream. This is a *mostly* identify function, expect for handling of |
5 | /// `$var:tt_kind` and `$(repeat),*` constructs. | 3 | /// `$var:tt_kind` and `$(repeat),*` constructs. |
4 | use crate::tt_cursor::TtCursor; | ||
6 | 5 | ||
7 | pub fn parse(tt: &tt::Subtree) -> Option<crate::MacroRules> { | 6 | pub(crate) fn parse(tt: &tt::Subtree) -> Option<crate::MacroRules> { |
8 | let mut parser = TtCursor::new(tt); | 7 | let mut parser = TtCursor::new(tt); |
9 | let mut rules = Vec::new(); | 8 | let mut rules = Vec::new(); |
10 | while !parser.is_eof() { | 9 | while !parser.is_eof() { |