export type EncodedToken = Uint8Array; export type EncodedUnicodeCharacter = number; /** * Encode a token as UTF8 bytes. * * @param from The string version of the token to encode. * @return {EncodedToken} The UTF8 encoded token. */ export declare function encodeToken(from: string): EncodedToken; /** * Encode a character into a unicode code point * * @param from The string to get the character from. * @param offset The offset of the character to encode. * @return {EncodedUnicodeCharacter} The encoded character number. */ export declare function encodeCharacter(from: string, offset?: number): EncodedUnicodeCharacter; /** * Class used to support matching a particular token */ export default class TokenMatch { private readonly encoded_; /** * Create this with a string that is translated to a UTF8 token to match in binary. * * @param from The string to create this from. */ constructor(from: string); /** * The matching function for the token. * * @param buffer The buffer to match the token in. * @param cursor The position in the buffer to match the token at. * @param endCursor The end position in the buffer to finish the match search. * @return {number} The cursor that corresponds to the end of the match for the token. */ match: (buffer: Uint8Array, cursor: number, endCursor: number) => number | undefined; } //# sourceMappingURL=token_parsing.d.ts.map