com.skillw.asahi.api.member.parser.prefix.namespacing.PrefixParser.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Pouvoir Show documentation
Show all versions of Pouvoir Show documentation
Bukkit Script Engine Plugin.
package com.skillw.asahi.api.member.parser.prefix.namespacing
import com.skillw.asahi.api.member.context.AsahiContext
import com.skillw.asahi.api.member.lexer.AsahiLexer
import com.skillw.asahi.api.member.quest.Quester
/**
* @className PrefixParser
*
* 前缀解释器的编译上下文
*
* @author Glom
* @date 2022/12/27 19:31 Copyright 2022 user.
*/
class PrefixParser private constructor(
reader: AsahiLexer,
) : AsahiLexer by reader {
companion object {
fun AsahiLexer.prefixParser(): PrefixParser {
return PrefixParser(this)
}
}
/**
* 结果
*
* @param exec 结果内容
* @param R 返回类型
* @return 返回的结果
* @receiver
*/
fun result(exec: AsahiContext.() -> R): Quester {
return Quester { exec() }
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy