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

com.skillw.asahi.internal.namespacing.prefix.lang.util.String.kt Maven / Gradle / Ivy

There is a newer version: 1.6.7-beta-6
Show newest version
package com.skillw.asahi.internal.namespacing.prefix.lang.util

import com.skillw.asahi.api.AsahiAPI.analysis
import com.skillw.asahi.api.annotation.AsahiPrefix
import com.skillw.asahi.api.prefixParser
import com.skillw.asahi.api.quest

/**
 * @className String
 *
 * @author Glom
 * @date 2023/1/17 15:37 Copyright 2024 Glom.
 */
@AsahiPrefix(["analysis", "inline"], "lang")
private fun inline() = prefixParser {
    val text = if (expect("all")) questList() else quest()
    result {
        text.get().let { obj ->
            when (obj) {
                is Collection<*> -> obj.map { it.toString().analysis(this, *namespaceNames()) }
                else -> obj.toString().analysis(this, *namespaceNames())
            }
        }
    }
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy