import MinimalPerfectHash from "../../indexing/minimal_perfect_hash.js"; import ParsingDfa4Table from "../../parsing/parsing_dfa_4table.js"; /** * Efficient DFA based parser for parsing a STEP enum. */ export default class StepEnumParser extends ParsingDfa4Table { /** * Construct the parsing DFA */ constructor(); /** * Parse a generated enum that is based on a minimal perfect hash. * * @param typeMap The map to the enum type using a minimal perfect hash that doesn't * require string extraction. * @param input The input buffer. * @param cursor The offset in the input buffer where the enum may be. * @param endCursor The end point of the parse which should not be overflowed. * @return {number | undefined} The matching enum value or undefined if none matches * or the parse fails. */ extract: (typeMap: MinimalPerfectHash, input: Uint8Array, cursor: number, endCursor: number) => T | undefined; /** * Match a step enum * * @param input The input buffer to match against. * @param cursor The cursor to test the match against. * @param endCursor The end point to look at in the buffer. * @return {number | undefined} The end of the match. */ match: (input: Uint8Array, cursor: number, endCursor: number) => number | undefined; static readonly Instance: StepEnumParser; } //# sourceMappingURL=step_enum_parser.d.ts.map