Package-level declarations

Types

Link copied to clipboard
@Serializable
sealed class FixtureExpression

Mirror of an expression that appears inside a kBars tag; polymorphic discriminator is the field kind.

Link copied to clipboard
@Serializable
class FixtureExpressionChain(val base: FixtureExpression, val transforms: List<FixtureTransformInvocation> = emptyList())

Mirror of an expression chain: a base expression plus zero or more transforms applied left-to-right.

Link copied to clipboard
@Serializable
class FixtureIfArm(val expression: FixtureExpressionChain, val body: List<FixtureSegment>, val trim: FixtureTrim = FixtureTrim())

Mirror of one arm of an {{#if}} block.

Link copied to clipboard
@Serializable
sealed class FixtureSegment

Mirror of a single AST segment; polymorphic discriminator is the field type.

Link copied to clipboard
@Serializable
class FixtureTemplateAst(val segments: List<FixtureSegment>)

Public, language-neutral mirror of a parsed template's AST, used to compare parse results against grammar conformance fixtures and to exchange parse trees across module boundaries without exposing internal AST types.

Link copied to clipboard
@Serializable
class FixtureTransformInvocation(val name: String, val arguments: List<FixtureExpressionChain> = emptyList())

Mirror of one transform invocation in a FixtureExpressionChain.

Link copied to clipboard
@Serializable
class FixtureTrim(val open: Boolean = false, val close: Boolean = false)

Mirror of one tag's whitespace-control (~ trim) state. Both flags default to false so fixtures that predate the whitespace-control model, and tags without any ~ marker, need not spell the field out.

Functions

Link copied to clipboard

Scans source for opener delimiters that lack a matching closer and rewrites each unmatched opener's leading { to \ so the lexer sees a well-formed escape (\{{) instead of entering an EXPR mode it cannot leave. Returns the unmodified source if every opener is matched.

Link copied to clipboard

Parses source as a kBars template and converts the result into its FixtureTemplateAst mirror — the public, language-neutral parse representation consumed by conformance runners outside this module.