mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
cleanup the api
This commit is contained in:
parent
a16f6bb27d
commit
b4b522fb39
3 changed files with 70 additions and 56 deletions
|
@ -1,10 +1,9 @@
|
|||
use crate::tt_cursor::TtCursor;
|
||||
|
||||
/// This module parses a raw `tt::TokenStream` into macro-by-example token
|
||||
/// stream. This is a *mostly* identify function, expect for handling of
|
||||
/// `$var:tt_kind` and `$(repeat),*` constructs.
|
||||
use crate::tt_cursor::TtCursor;
|
||||
|
||||
pub fn parse(tt: &tt::Subtree) -> Option<crate::MacroRules> {
|
||||
pub(crate) fn parse(tt: &tt::Subtree) -> Option<crate::MacroRules> {
|
||||
let mut parser = TtCursor::new(tt);
|
||||
let mut rules = Vec::new();
|
||||
while !parser.is_eof() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue