Package-level declarations

Types

Link copied to clipboard
class A2uiFunctionException(message: String, val call: String? = null) : RuntimeException

Thrown when a FunctionCall cannot be evaluated.

Link copied to clipboard

CLDR's cardinal plural rules for a bounded set of languages, evaluated in common code.

Link copied to clipboard
class CurrencyAffixes(val positivePrefix: String, val positiveSuffix: String, val negativePrefix: String, val negativeSuffix: String, val fractionDigits: Int)

Where a locale puts the currency sign, and how many fraction digits the currency has.

Link copied to clipboard
class DateNames(val wide: List<String>, val abbreviated: List<String>, val narrow: List<String>)

One set of names at the three widths TR35 distinguishes.

Link copied to clipboard

Everything an evaluation reads besides the call itself.

Link copied to clipboard
data class EvaluationLimits(val maxDepth: Int = DEFAULT_CALL_DEPTH, val maxSteps: Int = DEFAULT_CALL_STEPS, val maxResultLength: Int = DEFAULT_MAX_RESULT_LENGTH, val maxPatternLength: Int = DEFAULT_MAX_PATTERN_LENGTH, val maxSubjectLength: Int = DEFAULT_MAX_SUBJECT_LENGTH)

The bounds one evaluation runs under. See each default for what it is protecting against.

Link copied to clipboard

A locale-independent LocaleFormatter: ASCII separators, English names, English plural rules.

Link copied to clipboard

Why a function is being evaluated, which is what openUrl is allowed to depend on.

Link copied to clipboard
interface LocaleData

The locale-dependent data a formatter needs, separated from the formatting itself.

Link copied to clipboard
interface LocaleFormatter

The locale-sensitive half of the basic catalog, kept as a contract rather than an implementation.

Link copied to clipboard
class LocaleSymbols(val languageTag: String, val decimalSeparator: String, val groupSeparator: String, val minusSign: String, val groupSizes: List<Int>, val months: DateNames, val weekdays: DateNames, val amPm: List<String>)

The symbols one locale writes numbers and dates with.

Link copied to clipboard

The CLDR plural categories, which are also the optional argument names of pluralize.

Link copied to clipboard

The LocaleFormatter the renderer ships: LocaleData's symbols, this module's assembly.

Link copied to clipboard
fun interface UrlOpener

Opens a URL the evaluator has already validated.

Link copied to clipboard

The machine-readable code each built-in validation function reports a failure with.

Properties

Link copied to clipboard
const val DEFAULT_CALL_DEPTH: Int = 32

How many nested FunctionCalls deep an evaluation may go.

Link copied to clipboard

How many bindings and calls a single top-level evaluation may perform.

Link copied to clipboard

The longest regex pattern the evaluator will hand to Regex.

Link copied to clipboard

How many characters in total one evaluation may produce.

Link copied to clipboard

The longest subject regex will match against.

Functions

Link copied to clipboard
fun EvaluationContext.evaluate(value: BoundValue): JsonElement

value resolved against this context.

fun EvaluationContext.evaluate(call: FunctionCall): JsonElement

call evaluated against this context. @see evaluate

Link copied to clipboard

The ValidationResult a check's condition evaluates to.

Link copied to clipboard

A LocaleFormatter for languageTag, a BCP 47 tag.

Link copied to clipboard
actual fun platformLocaleData(languageTag: String?): LocaleData

Reads NSDateFormatter and NSNumberFormatter's symbols. @see LocaleData

expect fun platformLocaleData(languageTag: String?): LocaleData

The platform's locale data for languageTag, or for the device's current locale when it is null.

actual fun platformLocaleData(languageTag: String?): LocaleData

Reads java.text's tables, which the JVM and Android both carry. @see LocaleData

actual fun platformLocaleData(languageTag: String?): LocaleData

Reads Intl's tables, which Kotlin/JS and Kotlin/Wasm both reach the same way. @see LocaleData

Link copied to clipboard

A LocaleFormatter for whatever locale the device is currently set to.