Package-level declarations

Types

Link copied to clipboard
class FullParser(terminateParser: IMfmParser = CharSequenceTerminateParser) : RecursiveParserBase

An IMfmParser implementation for detecting all syntax.

Link copied to clipboard
interface IMfmParser

Interface for MFM parser. Used to find format in a given input string.

Link copied to clipboard

This is an interface definition for values used to exchange special parameters between IMfmParsers.

Link copied to clipboard

Interface for the result of MFM parser operation.

Link copied to clipboard
class InlineParser(terminateParser: IMfmParser = CharSequenceTerminateParser) : RecursiveParserBase

An IMfmParser implementation for detecting inline syntax.

Link copied to clipboard
interface ISubIndex

Represents an index used for accessing nested SubstringFoundInfo objects.

Link copied to clipboard
abstract class RecursiveParserBase(terminateParser: IMfmParser) : IMfmParser

Base implementation for detecting nested MFM forms within MFM forms. Parse recursively until terminateParser is satisfied. Note that the IMfmParsers registered in IMfmParserContext.excludeParsers, which are passed to IMfmParser.find, are not used during analysis.

Link copied to clipboard
class SimpleParser(terminateParser: IMfmParser = CharSequenceTerminateParser) : RecursiveParserBase
Link copied to clipboard
data class SubstringFoundInfo(val type: FoundType, val overallRange: IntRange, val contentRange: IntRange, val resumeIndex: Int, val nestedInfos: List<SubstringFoundInfo> = listOf())

Represents information about a found substring.

Functions

Link copied to clipboard

Creates an instance of IMfmParserResult with a failure flag and an empty found information.

Link copied to clipboard

Creates an instance of IMfmParserResult with a success flag and found information.

Creates an instance of IMfmParserResult with a success flag and a nested result.

fun success(foundType: FoundType, overallRange: IntRange, contentRange: IntRange, resumeIndex: Int, nestedInfos: List<SubstringFoundInfo> = listOf()): IMfmParserResult

Creates an instance of IMfmParserResult with a success flag, found information, and a list of nested information.