Library
core
src
parser
cst
util
Readme

Lawtext core referencesDocs


Lawtext core references / core/src/parser/cst/util

core/src/parser/cst/util

Type Aliases

ValueRule<TValue>

ValueRule<TValue>: Rule<string, TValue, Env, Empty>

Type Parameters

TValue

Defined in

core/src/parser/cst/util.ts:8 (opens in a new tab)


WithErrorRule<TValue>

WithErrorRule<TValue>: Rule<string, object, Env, Empty>

Type Parameters

TValue

Defined in

core/src/parser/cst/util.ts:10 (opens in a new tab)


WithErrorValue<TValue>

WithErrorValue<TValue>: object

Type Parameters

TValue

Type declaration

errors

errors: ErrorMessage[]

value

value: TValue

Defined in

core/src/parser/cst/util.ts:9 (opens in a new tab)

Functions

assertAllELsHaveRange()

assertAllELsHaveRange(elOrELs): void

Parameters

elOrELs: EL | EL[]

Returns

void

Defined in

core/src/parser/cst/util.ts:21 (opens in a new tab)


enumAllELs()

enumAllELs(el): EL[]

Parameters

el: string | EL

Returns

EL[]

Defined in

core/src/parser/cst/util.ts:12 (opens in a new tab)


mergeAdjacentTexts()

mergeAdjacentTexts<T>(inline): (__Text | T)[]

Type Parameters

T extends SentenceChildEL

Parameters

inline: T[]

Returns

(__Text | T)[]

Defined in

core/src/parser/cst/util.ts:43 (opens in a new tab)


mergeAdjacentTextsWithString()

mergeAdjacentTextsWithString<T>(inline): (__Text | T)[]

Type Parameters

T extends SentenceChildEL

Parameters

inline: (string | T)[]

Returns

(__Text | T)[]

Defined in

core/src/parser/cst/util.ts:47 (opens in a new tab)


separateTrailingSpaces()

separateTrailingSpaces<T>(inline): object

Type Parameters

T extends SentenceChildEL

Parameters

inline: (string | T)[]

Returns

object

inline

inline: (__Text | T)[]

spaces

spaces: string

Defined in

core/src/parser/cst/util.ts:76 (opens in a new tab)