Fix --features=parse_debug_trace

This commit is contained in:
Joshua Warner 2022-11-03 08:03:07 -07:00
parent d0fe108564
commit 469e1dc9e3
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
2 changed files with 5 additions and 3 deletions

View file

@ -737,6 +737,7 @@ pub trait Parser<'a, Output, Error> {
) -> ParseResult<'a, Output, Error>;
#[cfg(not(feature = "parse_debug_trace"))]
#[inline(always)]
fn trace(self, _message: &'static str) -> Self
where
Self: Sized,
@ -789,7 +790,7 @@ impl<'a, O: std::fmt::Debug, E: std::fmt::Debug, P: Parser<'a, O, E>> Parser<'a,
where
E: 'a,
{
fn parse(&self, arena: &'a Bump, state: State<'a>) -> ParseResult<'a, O, E> {
fn parse(&self, arena: &'a Bump, state: State<'a>, min_indent: u32) -> ParseResult<'a, O, E> {
use std::cell::RefCell;
thread_local! {
@ -803,7 +804,7 @@ where
let cur_indent = INDENT.with(|i| *i.borrow());
println!(
"{:>5?}: {}{:<50}",
"{:<5?}: {}{:<50}",
state.pos(),
&indent_text[..cur_indent * 2],
self.message