Library
core
modules
Core Src Parser Std Rules List

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

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

Table of contents

Variables

Functions

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:174 (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:169 (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:164 (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:159 (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

NameType
listOrSublistListOrSublist
indentTextsstring[]

Returns

Line[]

Defined in

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


makelistOrSublistRule

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

Type parameters

NameType
TTagextends "List" | "Sublist1" | "Sublist2" | "Sublist3"
TRetTTag extends "List" ? List : TTag extends "Sublist1" ? Sublist1 : TTag extends "Sublist2" ? Sublist2 : TTag extends "Sublist3" ? Sublist3 : never

Parameters

NameType
ruleNamestring
tagTTag
nextSublistRulenull | WithErrorRule<Diff<ListOrSublist, List>>

Returns

WithErrorRule<TRet>

Defined in

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