parsley.internal.machine.stacks.ErrorStack.scala Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2020 Parsley Contributors
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package parsley.internal.machine.stacks
import parsley.internal.machine.errors.DefuncError
private [machine] final class ErrorStack(var error: DefuncError, val tail: ErrorStack)
private [machine] object ErrorStack extends Stack[ErrorStack] {
implicit val inst: Stack[ErrorStack] = this
type ElemTy = DefuncError
// $COVERAGE-OFF$
override protected def show(x: ElemTy): String = x.toString
override protected def head(xs: ErrorStack): ElemTy = xs.error
override protected def tail(xs: ErrorStack): ErrorStack = xs.tail
// $COVERAGE-ON$
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy