parsley.internal.machine.XAssert.scala Maven / Gradle / Ivy
/* SPDX-FileCopyrightText: © 2020 Parsley Contributors
* SPDX-License-Identifier: BSD-3-Clause
*/
package parsley.internal.machine
import parsley.XAssert._
// $COVERAGE-OFF$
private [machine] object XAssert {
final inline def ensureRegularInstruction(inline ctx: =>Context): Unit = {
assert(ctx.status eq Good, s"regular instructions can only be executed when the status is Good, it is ${ctx.status}")
}
final inline def ensureHandlerInstruction(inline ctx: =>Context): Unit = {
assert(ctx.status eq Recover, s"handler instructions can only be executed when the status is Recover, it is ${ctx.status}")
}
}
// $COVERAGE-ON$
© 2015 - 2025 Weber Informatics LLC | Privacy Policy