Introduce NonterminalKind
It encapsulate the (part of) the interface between the parser and macro by example (macro_rules) parser. The second bit is somewhat more general `parse_ast_fragment`, which is the reason why we keep some `parse_xxx` functions as public.
This commit is contained in:
parent
dfe1e3b641
commit
2595d75ea9
9 changed files with 231 additions and 211 deletions
|
|
@ -1450,7 +1450,7 @@ impl<'a> Parser<'a> {
|
|||
|
||||
/// Matches `'-' lit | lit` (cf. `ast_validation::AstValidator::check_expr_within_pat`).
|
||||
/// Keep this in sync with `Token::can_begin_literal_maybe_minus`.
|
||||
pub fn parse_literal_maybe_minus(&mut self) -> PResult<'a, P<Expr>> {
|
||||
pub(super) fn parse_literal_maybe_minus(&mut self) -> PResult<'a, P<Expr>> {
|
||||
maybe_whole_expr!(self);
|
||||
|
||||
let lo = self.token.span;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue