All Downloads are FREE. Search and download functionalities are using the official Maven repository.

parsley.internal.machine.XAssert.scala Maven / Gradle / Ivy

There is a newer version: 5.0.0-M6
Show newest version
/* 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