abstract class Luce::Delimiter

Overview

A Delimiter indicating the possible "open" or possible "close" of a tag for a TagSyntax.

Direct Known Subclasses

Defined in:

luce/inline_parser.cr

Instance Method Summary

Instance Method Detail

abstract def 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).


abstract def active? : Bool #

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).


abstract def char : Int32 #

The type of delimiter

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


abstract def closable? : Bool #

Whether this delimiter can close emphasis or strong emphasis.


abstract def node : Text #

The Text ndoe representing the plain text representing this delimiter


abstract def node=(node : Text) #

The Text ndoe representing the plain text representing this delimiter


abstract def openable? : Bool #

Whether this delimiter can open emphasis or strong emphasis.


abstract def size : Int32 #

The number of delimiters


abstract def syntax : TagSyntax #

The syntax which uses this delimiter to parse a tag.