Lawtext core references / core/src/parser/cst/util
core/src/parser/cst/util
Type Aliases
ValueRule<TValue>
ValueRule<
TValue
>:Rule
<string
,TValue
,Env
,Empty
>
Defined in: core/src/parser/cst/util.ts:8 (opens in a new tab)
Type Parameters
• TValue
WithErrorRule<TValue>
WithErrorRule<
TValue
>:Rule
<string
, {errors
:ErrorMessage
[];value
:TValue
; },Env
,Empty
>
Defined in: core/src/parser/cst/util.ts:10 (opens in a new tab)
Type Parameters
• TValue
WithErrorValue<TValue>
WithErrorValue<
TValue
>:object
Defined in: core/src/parser/cst/util.ts:9 (opens in a new tab)
Type Parameters
• TValue
Type declaration
errors
errors:
ErrorMessage
[]
value
value:
TValue
Functions
assertAllELsHaveRange()
assertAllELsHaveRange(
elOrELs
):void
Defined in: core/src/parser/cst/util.ts:21 (opens in a new tab)
Parameters
elOrELs
Returns
void
enumAllELs()
enumAllELs(
el
):EL
[]
Defined in: core/src/parser/cst/util.ts:12 (opens in a new tab)
Parameters
el
string
| EL
Returns
EL
[]
mergeAdjacentTexts()
mergeAdjacentTexts<
T
>(inline
): (__Text
|T
)[]
Defined in: core/src/parser/cst/util.ts:43 (opens in a new tab)
Type Parameters
• T extends SentenceChildEL
Parameters
inline
T
[]
Returns
(__Text
| T
)[]
mergeAdjacentTextsWithString()
mergeAdjacentTextsWithString<
T
>(inline
): (__Text
|T
)[]
Defined in: core/src/parser/cst/util.ts:47 (opens in a new tab)
Type Parameters
• T extends SentenceChildEL
Parameters
inline
(string
| T
)[]
Returns
(__Text
| T
)[]
separateTrailingSpaces()
separateTrailingSpaces<
T
>(inline
):object
Defined in: core/src/parser/cst/util.ts:76 (opens in a new tab)
Type Parameters
• T extends SentenceChildEL
Parameters
inline
(string
| T
)[]
Returns
object
inline
inline: (
__Text
|T
)[]
spaces
spaces:
string