TokenData

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, _.

Parameters

text

the substring extracted from the source code, also known as lexeme.

position

location of the token within the source code

groups

capture groups values for this token

namedGroups

capture groups that hold a name. groups does not contain groups from namedGroups

See also

Constructors

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

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard