Introduced properties

Redefined properties

redef type SELF: TestTokenProcessor

markdown $ TestTokenProcessor :: SELF

Type of this instance, automatically specialized in every class
redef fun token_at(input: Text, pos: Int): Token

markdown $ TestTokenProcessor :: token_at

Get the token kind at pos.

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 DECORATOR: Decorator

markdown :: MarkdownProcessor :: DECORATOR

Kind of decorator used for decoration.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _buffer_stack: List[FlatBuffer]

markdown :: MarkdownProcessor :: _buffer_stack

Stacked buffers.
private var _current_block: nullable MDBlock

markdown :: MarkdownProcessor :: _current_block

Currently processed block.
private var _current_line: nullable MDLine

markdown :: MarkdownProcessor :: _current_line

Currently processed line.
private var _current_pos: Int

markdown :: MarkdownProcessor :: _current_pos

Currently processed position in current_text.
private var _current_text: nullable Text

markdown :: MarkdownProcessor :: _current_text

Currently processed text.
private var _decorator: DECORATOR

markdown :: MarkdownProcessor :: _decorator

Decorator used for output.
private var _ext_mode: Bool

markdown :: MarkdownProcessor :: _ext_mode

Work in extended mode (default).
private var _in_list: Bool

markdown :: MarkdownProcessor :: _in_list

Is the current recursion in list mode?
private var _loc_stack: List[MDLocation]

markdown :: MarkdownProcessor :: _loc_stack

Stacked locations.
private var _no_location: Bool

markdown :: MarkdownProcessor :: _no_location

Disable attaching MDLocation to Tokens
fun add(e: Writable)

markdown :: MarkdownProcessor :: add

Append e to current buffer.
fun addc(c: Char)

markdown :: MarkdownProcessor :: addc

Append c to current buffer.
fun addn

markdown :: MarkdownProcessor :: addn

Append a "\n" line break.
private fun buffer_stack: List[FlatBuffer]

markdown :: MarkdownProcessor :: buffer_stack

Stacked buffers.
private fun buffer_stack=(buffer_stack: List[FlatBuffer])

markdown :: MarkdownProcessor :: buffer_stack=

Stacked buffers.
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 current_block: nullable MDBlock

markdown :: MarkdownProcessor :: current_block

Currently processed block.
fun current_block=(current_block: nullable MDBlock)

markdown :: MarkdownProcessor :: current_block=

Currently processed block.
private fun current_buffer: FlatBuffer

markdown :: MarkdownProcessor :: current_buffer

Current output buffer.
fun current_line: nullable MDLine

markdown :: MarkdownProcessor :: current_line

Currently processed line.
fun current_line=(current_line: nullable MDLine)

markdown :: MarkdownProcessor :: current_line=

Currently processed line.
private fun current_loc: MDLocation

markdown :: MarkdownProcessor :: current_loc

Current output buffer.
private fun current_pos: Int

markdown :: MarkdownProcessor :: current_pos

Currently processed position in current_text.
private fun current_pos=(current_pos: Int)

markdown :: MarkdownProcessor :: current_pos=

Currently processed position in current_text.
private fun current_text: nullable Text

markdown :: MarkdownProcessor :: current_text

Currently processed text.
private fun current_text=(current_text: nullable Text)

markdown :: MarkdownProcessor :: current_text=

Currently processed text.
fun decorator: DECORATOR

markdown :: MarkdownProcessor :: decorator

Decorator used for output.
fun decorator=(decorator: DECORATOR)

markdown :: MarkdownProcessor :: decorator=

Decorator used for output.
fun emit(block: Block): Text

markdown :: MarkdownProcessor :: emit

Output block using decorator in the current buffer.
fun emit_in(block: Block)

markdown :: MarkdownProcessor :: emit_in

Output the content of block.
fun emit_text(text: Text)

markdown :: MarkdownProcessor :: emit_text

Transform and emit mardown text
fun emit_text_until(text: Text, start: Int, token: nullable Token): Int

markdown :: MarkdownProcessor :: emit_text_until

Transform and emit mardown text starting at start and
fun ext_mode: Bool

markdown :: MarkdownProcessor :: ext_mode

Work in extended mode (default).
protected fun ext_mode=(ext_mode: Bool)

markdown :: MarkdownProcessor :: ext_mode=

Work in extended mode (default).
fun find_token(text: Text, start: Int, token: Token): Int

markdown :: MarkdownProcessor :: find_token

Find the position of a token in self.
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.
private fun in_list: Bool

markdown :: MarkdownProcessor :: in_list

Is the current recursion in list mode?
private fun in_list=(in_list: Bool)

markdown :: MarkdownProcessor :: in_list=

Is the current recursion in list mode?
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".
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 line_kind(md: MDLine): Line

markdown :: MarkdownProcessor :: line_kind

The type of line.
private fun loc_stack: List[MDLocation]

markdown :: MarkdownProcessor :: loc_stack

Stacked locations.
private fun loc_stack=(loc_stack: List[MDLocation])

markdown :: MarkdownProcessor :: loc_stack=

Stacked locations.
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
fun no_location: Bool

markdown :: MarkdownProcessor :: no_location

Disable attaching MDLocation to Tokens
fun no_location=(no_location: Bool)

markdown :: MarkdownProcessor :: no_location=

Disable attaching MDLocation to Tokens
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).
private fun pop_buffer

markdown :: MarkdownProcessor :: pop_buffer

Pop the last buffer.
private fun pop_loc: MDLocation

markdown :: MarkdownProcessor :: pop_loc

Pop the last buffer.
fun process(input: String): Writable

markdown :: MarkdownProcessor :: process

Process the mardown input string and return the processed output.
private fun push_buffer: FlatBuffer

markdown :: MarkdownProcessor :: push_buffer

Push a new buffer on the stack.
private fun push_loc(location: MDLocation)

markdown :: MarkdownProcessor :: push_loc

Push a new MDLocation on the stack.
private fun read_lines(input: String): MDBlock

markdown :: MarkdownProcessor :: read_lines

Split input string into MDLines and create a parent MDBlock with it.
fun recurse(root: MDBlock, in_list: Bool)

markdown :: MarkdownProcessor :: recurse

Recursively split a block.
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.
protected fun test_stack=(test_stack: Array[String])

markdown :: TestTokenProcessor :: test_stack=

abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
fun token_at(text: Text, pos: Int): Token

markdown :: MarkdownProcessor :: token_at

Get the token kind at pos.
init with_decorator(decorator: DECORATOR)

markdown :: MarkdownProcessor :: with_decorator

Create a new MarkdownEmitter using a custom decorator.
package_diagram markdown::TestTokenProcessor TestTokenProcessor markdown::MarkdownProcessor MarkdownProcessor markdown::TestTokenProcessor->markdown::MarkdownProcessor core::Object Object markdown::MarkdownProcessor->core::Object ...core::Object ... ...core::Object->core::Object

Ancestors

interface Object

core :: Object

The root of the class hierarchy.

Parents

class MarkdownProcessor

markdown :: MarkdownProcessor

Parse a markdown string and split it in blocks.

Class definitions

markdown $ TestTokenProcessor
class TestTokenProcessor
	super MarkdownProcessor

	var test_stack: Array[String]

	redef fun token_at(input, pos) do
		var token = super
		if token isa TokenNone then return token
		var res = "{token.class_name} at {token.location or else "?"}"
		var exp = test_stack.shift
		print ""
		print "EXP {exp}"
		print "RES {res}"
		assert exp == res
		return token
	end
end
lib/markdown/test_markdown.nit:2824,1--2840,3