class

Luce::SimpleDelimiter

Inherits Luce::Delimiter < Reference < Object

A simple delimiter implementing the Delimiter interface with basic fields, and does not have the concept of "left-flanking" or "right-flanking"

Constructors

new(node : Luce::Text, char : Int32, size : Int32, openable : Bool, closable : Bool, syntax : Luce::DelimiterSyntax, end_pos : Int32)

Instance methods

active=(active : Bool) : Nil

Whether the delimiter is active

Links cannot be nested, so we must "deactivate" any pending ones. For example, take the following text:

Text [link and [more](links)](links).

Once we have parsed Text [, there is one (pending) link in the state stack. It is, by default, active. Once we parse the next possible link, [more](links), as a real link, we must deactivate the pending links (just the one, in this case).

active?

Whether the delimiter is active

Links cannot be nested, so we must "deactivate" any pending ones. For example, take the following text:

Text [link and [more](links)](links).

Once we have parsed Text [, there is one (pending) link in the state stack. It is, by default, active. Once we parse the next possible link, [more](links), as a real link, we must deactivate the pending links (just the one, in this case).

char

The type of delimiter

For the two-character image delimiter, ![, this is !.

closable?

Whether this delimiter can close emphasis or strong emphasis.

end_pos
node

The Text ndoe representing the plain text representing this delimiter

node=(node : Text)

The Text ndoe representing the plain text representing this delimiter

openable?

Whether this delimiter can open emphasis or strong emphasis.

size

The number of delimiters

syntax

The syntax which uses this delimiter to parse a tag.