type

Delimiter

src @Js
class Delimiter : Obj

Delimiter (emphasis, strong emphasis, or custom emphasis)

constructors

fields

canClose

can close emphasis, see spec.

canOpen

can open emphasis, see spec.

chars
delimChar
next
origSize

The number of characters originally in this delimiter run; at the start of processing, this is the same as size

prev

methods

closer

Return the innermost closing delimiter, e.g.

closers

Get the closing delimiter nodes for the specified number of delimiters.

opener

Return the innermost opening delimiter, e.g.

openers

Get the opening delimiter nodes for the specified number of delimiters.

size

The number of characters in this delimiter run (that are left for processing)

toStr

Slot Details

canClose

src const Bool canClose

can close emphasis, see spec.

canOpen

src const Bool canOpen

can open emphasis, see spec.

chars

src Text[] chars { private set }

closer

src Text closer()

Return the innermost closing delimiter, e.g. for *** this is the first *

closers

src Text[] closers(Int len)

Get the closing delimiter nodes for the specified number of delimiters.

For example, for a delimiter run ***, calling this with 1 would return the first *, calling it with 2 would return the first * and the second *.

delimChar

src const Int delimChar

make

src new make(Text[] chars, Int delimChar, Bool canOpen, Bool canClose, Delimiter? prev)

next

opener

src Text opener()

Return the innermost opening delimiter, e.g. for *** this is the last *

openers

src Text[] openers(Int len)

Get the opening delimiter nodes for the specified number of delimiters.

For example, for a delimiter run ***, calling this with 1 would return the last *. Calling it with 2 would return the second last * and last *.

origSize

src const Int origSize

The number of characters originally in this delimiter run; at the start of processing, this is the same as size

prev

size

src Int size()

The number of characters in this delimiter run (that are left for processing)

toStr

src virtual override Str toStr()