Some tokens have a specific markup behaviour that is handled here.
markdown :: Token :: defaultinit
MarkdownEmitter::decorator
.
self
in the original input.
markdown :: Token :: location=
Location ofself
in the original input.
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
markdown :: Token :: defaultinit
core :: Object :: defaultinit
MarkdownEmitter::decorator
.
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
self
in the original input.
markdown :: Token :: location=
Location ofself
in the original input.
core :: Object :: output_class_name
Display class name on stdout (debug only).
# A token represent a character in the markdown input.
# Some tokens have a specific markup behaviour that is handled here.
abstract class Token
# Location of `self` in the original input.
var location: nullable MDLocation
# Position of `self` in input independant from lines.
var pos: Int
# Character found at `pos` in the markdown input.
var char: Char
# Output that token using `MarkdownEmitter::decorator`.
fun emit(v: MarkdownProcessor) do v.decorator.add_char(v, char)
end
lib/markdown/markdown.nit:1955,1--1970,3