Scope

class Scope(val bundle: FluentBundle, val args: FluentArgs?, val errors: MutableList<FluentError> = mutableListOf(), placeables: MutableSet<String> = mutableSetOf(), val rootMessageId: String? = null, counter: PlaceableCounter = PlaceableCounter(), maxPlaceables: Int = DEFAULT_MAX_PLACEABLES)(source)

Constructors

Link copied to clipboard
constructor(bundle: FluentBundle, args: FluentArgs?, errors: MutableList<FluentError> = mutableListOf(), placeables: MutableSet<String> = mutableSetOf(), rootMessageId: String? = null, counter: PlaceableCounter = PlaceableCounter(), maxPlaceables: Int = DEFAULT_MAX_PLACEABLES)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun childScope(args: FluentArgs?, errors: MutableList<FluentError> = mutableListOf()): Scope

Create a child scope that shares this scope's placeable tracking set and counter (for cycle detection and TooManyPlaceables limits) but has its own args and error list. Used when resolving term bodies that need isolated error collection without losing cycle detection state.

Link copied to clipboard
Link copied to clipboard

Increment the placeable resolution counter. Returns false if the limit has been exceeded (and records a ResolverError.TooManyPlaceables error the first time the limit is crossed).

Link copied to clipboard
Link copied to clipboard