mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 15:03:46 +00:00
Fix --features=parse_debug_trace
This commit is contained in:
parent
d0fe108564
commit
469e1dc9e3
2 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue