Library
core
src
parser
std
rules
$list
Readme

Lawtext core referencesDocs


Lawtext core references / core/src/parser/std/rules/$list

core/src/parser/std/rules/$list

Variables

$list

const $list: WithErrorRule<List>

The parser rule for std.List. Please see the source code for the detailed syntax, and the test code (opens in a new tab) for examples.

Defined in

core/src/parser/std/rules/$list.ts:177 (opens in a new tab)


$sublist1

const $sublist1: WithErrorRule<Sublist1>

The parser rule for std.Sublist1. Please see the source code for the detailed syntax, and the test code (opens in a new tab) for examples.

Defined in

core/src/parser/std/rules/$list.ts:172 (opens in a new tab)


$sublist2

const $sublist2: WithErrorRule<Sublist2>

The parser rule for std.Sublist2. Please see the source code for the detailed syntax, and the test code (opens in a new tab) for examples.

Defined in

core/src/parser/std/rules/$list.ts:167 (opens in a new tab)


$sublist3

const $sublist3: WithErrorRule<Sublist3>

The parser rule for std.Sublist3. Please see the source code for the detailed syntax, and the test code (opens in a new tab) for examples.

Defined in

core/src/parser/std/rules/$list.ts:162 (opens in a new tab)

Functions

listOrSublistToLines()

listOrSublistToLines(listOrSublist, indentTexts): Line[]

The renderer for List or sublist (ListOrSublist). Please see the source code for the detailed syntax, and the test code (opens in a new tab) for examples.

Parameters

listOrSublist: ListOrSublist

indentTexts: string[]

Returns

Line[]

Defined in

core/src/parser/std/rules/$list.ts:18 (opens in a new tab)


makelistOrSublistRule()

makelistOrSublistRule<TTag, TRet>(ruleName, tag, nextSublistRule): WithErrorRule<TRet>

Type Parameters

TTag extends "List" | "Sublist1" | "Sublist2" | "Sublist3"

TRet = TTag extends "List" ? List : TTag extends "Sublist1" ? Sublist1 : TTag extends "Sublist2" ? Sublist2 : TTag extends "Sublist3" ? Sublist3 : never

Parameters

ruleName: string

tag: TTag

nextSublistRule: null | WithErrorRule<Diff<ListOrSublist, List>>

Returns

WithErrorRule<TRet>

Defined in

core/src/parser/std/rules/$list.ts:56 (opens in a new tab)