com.skillw.asahi.api.member.context.InfixContext.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.context
import com.skillw.asahi.api.member.lexer.AsahiLexer
import com.skillw.asahi.api.member.quest.LazyQuester
import com.skillw.asahi.api.quest
import com.skillw.asahi.api.questSafely
import com.skillw.asahi.internal.util.Time
/**
* @className InfixContext
*
* @author Glom
* @date 2022/12/24 15:05 Copyright 2022 user.
*/
open class InfixContext(
val context: AsahiContext, val reader: AsahiLexer, var token: String = "@NONE",
) : AsahiContext by context, AsahiLexer by reader {
inline fun parse(): R = quest().get()
fun parseString() = parse()
/** 解析 int */
fun parseInt() = parse()
/** 解析 double */
fun parseDouble() = parse()
/** 解析 float */
fun parseFloat() = parse()
/** 解析 byte */
fun parseByte() = parse()
/** 解析 short */
fun parseShort() = parse()
/** 解析 boolean */
fun parseBoolean() = parse()
/** 解析 long */
fun parseLong() = parse()
/** 解析 list */
fun parseList() = parse>()
/** 解析 array */
fun parseArray() = parse>()
/** 解析 map */
fun parseMap() = parse>()
/** 解析 tokenizer */
fun parseObj() = questSafely().get()
fun parseAny() = parse()
/** 解析 map */
fun parseLazy() = parse>()
/** 解析 Time */
fun parseTime() = parse
© 2015 - 2024 Weber Informatics LLC | Privacy Policy