mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Make BoxedParser available to releases
This commit is contained in:
parent
7050547f9c
commit
1b04830147
1 changed files with 0 additions and 3 deletions
|
@ -1319,12 +1319,10 @@ where
|
||||||
// explosions in types (and thus monomorphization, and thus build time),
|
// explosions in types (and thus monomorphization, and thus build time),
|
||||||
// but has runtime overhead, so we only use these in debug builds.
|
// but has runtime overhead, so we only use these in debug builds.
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
|
||||||
pub struct BoxedParser<'a, Output> {
|
pub struct BoxedParser<'a, Output> {
|
||||||
parser: Box<dyn Parser<'a, Output> + 'a>,
|
parser: Box<dyn Parser<'a, Output> + 'a>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
|
||||||
impl<'a, Output> BoxedParser<'a, Output> {
|
impl<'a, Output> BoxedParser<'a, Output> {
|
||||||
fn new<P>(parser: P) -> Self
|
fn new<P>(parser: P) -> Self
|
||||||
where
|
where
|
||||||
|
@ -1336,7 +1334,6 @@ impl<'a, Output> BoxedParser<'a, Output> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
|
||||||
impl<'a, Output> Parser<'a, Output> for BoxedParser<'a, Output> {
|
impl<'a, Output> Parser<'a, Output> for BoxedParser<'a, Output> {
|
||||||
fn parse(&self, arena: &'a Bump, state: State<'a>) -> ParseResult<'a, Output> {
|
fn parse(&self, arena: &'a Bump, state: State<'a>) -> ParseResult<'a, Output> {
|
||||||
self.parser.parse(arena, state)
|
self.parser.parse(arena, state)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue