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

com.skillw.asahi.api.member.lexer.JavaLexer.kt Maven / Gradle / Ivy

There is a newer version: 1.6.7-beta-6
Show newest version
package com.skillw.asahi.api.member.lexer

import com.skillw.asahi.api.member.context.AsahiContext
import com.skillw.asahi.api.member.quest.Quester

/**
 * @className JavaFuncReader
 *
 * @author Glom
 * @date 2023/1/15 13:18 Copyright 2024 Glom.
 */
class JavaLexer(reader: AsahiLexer) : AsahiLexer by reader {
    /**
     * 加了一层类型转换的quest
     *
     * @param R 类型
     * @return
     */
    fun  questAs(): Quester {
        return questObj() as Quester
    }

    /**
     * 结果
     *
     * @param exec 结果内容
     * @param R 返回类型
     * @return
     * @receiver
     */
    fun  result(exec: AsahiContext.() -> R): Quester {
        return Quester { exec() }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy