Lawtext core references / core/src/parser/cst/rules/makeRangesRule
core/src/parser/cst/rules/makeRangesRule
Type Aliases
RangeMaker()<TPointer, TRange>
RangeMaker<
TPointer
,TRange
>: (from
,midText
,to
,trailingText
,modifierParentheses
,range
) =>TRange
Defined in: core/src/parser/cst/rules/makeRangesRule.ts:7 (opens in a new tab)
Type Parameters
• TPointer
• TRange
Parameters
from
TPointer
midText
{ range
: [number
, number
]; text
: string
; } | null
to
TPointer
| null
trailingText
{ range
: [number
, number
]; text
: string
; } | null
modifierParentheses
__Parentheses
| null
range
[number
, number
]
Returns
TRange
RangesMaker()<TRange, TRanges>
RangesMaker<
TRange
,TRanges
>: (first
,midText
,rest
,range
) =>WithErrorValue
<TRanges
>
Defined in: core/src/parser/cst/rules/makeRangesRule.ts:25 (opens in a new tab)
Type Parameters
• TRange
• TRanges
Parameters
first
WithErrorValue
<TRange
>
midText
{ range
: [number
, number
]; text
: string
; } | null
rest
WithErrorValue
<TRanges
> | null
range
[number
, number
]
Returns
WithErrorValue
<TRanges
>
Variables
ptnRangesConnectors
const
ptnRangesConnectors:string
[]
Defined in: core/src/parser/cst/rules/makeRangesRule.ts:44 (opens in a new tab)
Functions
makeRangesRule()
makeRangesRule<
TPointer
,TRange
,TRanges
>(lazyPointerRule
,rangeMaker
,rangesMaker
):object
Defined in: core/src/parser/cst/rules/makeRangesRule.ts:48 (opens in a new tab)
Type Parameters
• TPointer
• TRange = [TPointer
, TPointer
]
• TRanges = [TPointer
, TPointer
][]
Parameters
lazyPointerRule
() => ValueRule
<TPointer
>
rangeMaker
RangeMaker
<TPointer
, TRange
> = ...
rangesMaker
RangesMaker
<TRange
, TRanges
> = ...
Returns
object
$range
$range:
WithErrorRule
<TRange
>
$ranges
$ranges:
WithErrorRule
<TRanges
>
References
default
Renames and re-exports makeRangesRule