Opening bracket for links and images

Introduced properties

fun allowed: Bool

markdown2 :: MdBracket :: allowed

Whether this bracket is allowed to form a link/image
protected fun allowed=(allowed: Bool)

markdown2 :: MdBracket :: allowed=

Whether this bracket is allowed to form a link/image
fun bracket_after: Bool

markdown2 :: MdBracket :: bracket_after

Whether there is an unescaped bracket (opening or closing) anywhere after this bracket
protected fun bracket_after=(bracket_after: Bool)

markdown2 :: MdBracket :: bracket_after=

Whether there is an unescaped bracket (opening or closing) anywhere after this bracket
fun column: Int

markdown2 :: MdBracket :: column

COlumn of the bracket
protected fun column=(column: Int)

markdown2 :: MdBracket :: column=

COlumn of the bracket
init defaultinit(node: MdText, index: Int, column: Int, is_image: Bool, prev: nullable MdBracket, prev_delimiter: nullable MdDelimiter)

markdown2 :: MdBracket :: defaultinit

init image(node: MdText, index: Int, column: Int, prev: nullable MdBracket, prev_delimiter: nullable MdDelimiter)

markdown2 :: MdBracket :: image

Create a new bracket for an image
fun index: Int

markdown2 :: MdBracket :: index

Index of the bracket in the original string
protected fun index=(index: Int)

markdown2 :: MdBracket :: index=

Index of the bracket in the original string
fun is_image: Bool

markdown2 :: MdBracket :: is_image

Is this bracket opening an image?
protected fun is_image=(is_image: Bool)

markdown2 :: MdBracket :: is_image=

Is this bracket opening an image?
fun node: MdText

markdown2 :: MdBracket :: node

Node containing the bracket
protected fun node=(node: MdText)

markdown2 :: MdBracket :: node=

Node containing the bracket
fun prev: nullable MdBracket

markdown2 :: MdBracket :: prev

Previous bracket
protected fun prev=(prev: nullable MdBracket)

markdown2 :: MdBracket :: prev=

Previous bracket
fun prev_delimiter: nullable MdDelimiter

markdown2 :: MdBracket :: prev_delimiter

Previous delimiter
protected fun prev_delimiter=(prev_delimiter: nullable MdDelimiter)

markdown2 :: MdBracket :: prev_delimiter=

Previous delimiter

Redefined properties

redef type SELF: MdBracket

markdown2 $ MdBracket :: SELF

Type of this instance, automatically specialized in every class

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
fun allowed: Bool

markdown2 :: MdBracket :: allowed

Whether this bracket is allowed to form a link/image
protected fun allowed=(allowed: Bool)

markdown2 :: MdBracket :: allowed=

Whether this bracket is allowed to form a link/image
fun bracket_after: Bool

markdown2 :: MdBracket :: bracket_after

Whether there is an unescaped bracket (opening or closing) anywhere after this bracket
protected fun bracket_after=(bracket_after: Bool)

markdown2 :: MdBracket :: bracket_after=

Whether there is an unescaped bracket (opening or closing) anywhere after this bracket
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun column: Int

markdown2 :: MdBracket :: column

COlumn of the bracket
protected fun column=(column: Int)

markdown2 :: MdBracket :: column=

COlumn of the bracket
init defaultinit(node: MdText, index: Int, column: Int, is_image: Bool, prev: nullable MdBracket, prev_delimiter: nullable MdDelimiter)

markdown2 :: MdBracket :: defaultinit

fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
init image(node: MdText, index: Int, column: Int, prev: nullable MdBracket, prev_delimiter: nullable MdDelimiter)

markdown2 :: MdBracket :: image

Create a new bracket for an image
fun index: Int

markdown2 :: MdBracket :: index

Index of the bracket in the original string
protected fun index=(index: Int)

markdown2 :: MdBracket :: index=

Index of the bracket in the original string
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
fun is_image: Bool

markdown2 :: MdBracket :: is_image

Is this bracket opening an image?
protected fun is_image=(is_image: Bool)

markdown2 :: MdBracket :: is_image=

Is this bracket opening an image?
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun node: MdText

markdown2 :: MdBracket :: node

Node containing the bracket
protected fun node=(node: MdText)

markdown2 :: MdBracket :: node=

Node containing the bracket
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun prev: nullable MdBracket

markdown2 :: MdBracket :: prev

Previous bracket
protected fun prev=(prev: nullable MdBracket)

markdown2 :: MdBracket :: prev=

Previous bracket
fun prev_delimiter: nullable MdDelimiter

markdown2 :: MdBracket :: prev_delimiter

Previous delimiter
protected fun prev_delimiter=(prev_delimiter: nullable MdDelimiter)

markdown2 :: MdBracket :: prev_delimiter=

Previous delimiter
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
package_diagram markdown2::MdBracket MdBracket core::Object Object markdown2::MdBracket->core::Object

Parents

interface Object

core :: Object

The root of the class hierarchy.

Class definitions

markdown2 $ MdBracket
# Opening bracket for links and images
class MdBracket

	# Node containing the bracket
	var node: MdText

	# Index of the bracket in the original string
	var index: Int

	# COlumn of the bracket
	var column: Int

	# Is this bracket opening an image?
	var is_image: Bool

	# Previous bracket
	var prev: nullable MdBracket

	# Previous delimiter
	var prev_delimiter: nullable MdDelimiter

	# Whether this bracket is allowed to form a link/image
	var allowed = true

	# Whether there is an unescaped bracket (opening or closing) anywhere after this bracket
	var bracket_after = false

	# Create a new bracket for a link
	init link(node: MdText, index: Int, column: Int, prev: nullable MdBracket, prev_delimiter: nullable MdDelimiter) do
		init(node, index, column, false, prev, prev_delimiter)
	end

	# Create a new bracket for an image
	init image(node: MdText, index: Int, column: Int, prev: nullable MdBracket, prev_delimiter: nullable MdDelimiter) do
		init(node, index, column, true, prev, prev_delimiter)
	end
end
lib/markdown2/markdown_inline_parsing.nit:1191,1--1227,3