Urara-Blog/node_modules/.pnpm-store/v3/files/ed/15d23238044ef7313f232d8e55260dd307b07a14b84b2b3500e0a3c33bad9bd9e20674f15bf256ad77f17cbd539768c5c70e7115cb87505a08c3e52dfd8ec8
2022-08-14 01:14:53 +08:00

40 lines
1.7 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Create a tokenizer.
* Tokenizers deal with one type of data (e.g., containers, flow, text).
* The parser is the object dealing with it all.
* `initialize` works like other constructs, except that only its `tokenize`
* function is used, in which case it doesnt receive an `ok` or `nok`.
* `from` can be given to set the point before the first character, although
* when further lines are indented, they must be set with `defineSkip`.
*
* @param {ParseContext} parser
* @param {InitialConstruct} initialize
* @param {Omit<Point, '_index'|'_bufferIndex'>} [from]
* @returns {TokenizeContext}
*/
export function createTokenizer(
parser: ParseContext,
initialize: InitialConstruct,
from?:
| Omit<import('micromark-util-types').Point, '_index' | '_bufferIndex'>
| undefined
): TokenizeContext
export type Code = import('micromark-util-types').Code
export type Chunk = import('micromark-util-types').Chunk
export type Point = import('micromark-util-types').Point
export type Token = import('micromark-util-types').Token
export type Effects = import('micromark-util-types').Effects
export type State = import('micromark-util-types').State
export type Construct = import('micromark-util-types').Construct
export type InitialConstruct = import('micromark-util-types').InitialConstruct
export type ConstructRecord = import('micromark-util-types').ConstructRecord
export type TokenizeContext = import('micromark-util-types').TokenizeContext
export type ParseContext = import('micromark-util-types').ParseContext
export type Info = {
restore: () => void
from: number
}
/**
* Handle a successful run.
*/
export type ReturnHandle = (construct: Construct, info: Info) => void