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

com.skillw.asahi.internal.namespacing.infix.linking.InfixBool.kt Maven / Gradle / Ivy

The newest version!
package com.skillw.asahi.internal.namespacing.infix.linking

import com.skillw.asahi.api.annotation.AsahiInfix
import com.skillw.asahi.api.member.parser.infix.namespacing.BaseInfix

/**
 * @className ActionBool
 *
 * @author Glom
 * @date 2022年12月13日14点47分 Copyright 2022 user. 
 */
@AsahiInfix
internal object InfixBool : BaseInfix(Boolean::class.java) {
    init {
        infix("?") { bool ->
            if (bool) {
                val result = parse()
                expect(":")
                skip()
                result
            } else {
                skip()
                expect(":")
                parse()
            }
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy