Package-level declarations

Types

Link copied to clipboard
abstract class AbstractLexer(val source: CharSequence) : Lexer

A Lexer that expects iterations through source content.

Link copied to clipboard
interface Lexer

A scanner that transforms raw string data into a list of token. For instance, the Markdown code Hello _Quarkdown_ is tokenized by its implementation into Hello , _, Quarkdown, _. See lexing_examples.txt for further information.

Link copied to clipboard
abstract class Token(val data: TokenData)

A wrapper of a TokenData that may be parsed in order to extract information. A token can be parsed into a com.quarkdown.core.ast.Node.

Link copied to clipboard
data class TokenCoordinates(val line: Int, val column: Int)

The position of a token within the source code.

Link copied to clipboard
data class TokenData(val text: String, val position: IntRange, val groups: Sequence<String> = emptySequence(), val namedGroups: Map<String, String> = emptyMap(), val walkerResult: WalkerParsingResult<*>? = null)

Data of a single, usually small, substring of the source code that stores a chunk of information. For instance, the Markdown code Hello _Quarkdown_ contains the tokens Hello , _, Quarkdown, _.

Functions

Link copied to clipboard

Accepts a list of tokens to a shared visitor.

Link copied to clipboard

Converts a range of indexes within a string to its (x, y) coordinates.