import { Token, Tokenizer, TokenizerOptions } from "./tokenizer.js"; import { ProgrammingLanguage } from "../language.js"; export declare class CodeTokenizer extends Tokenizer { private readonly parser; /** * Creates a new tokenizer of the given language. Will throw an error when the * given language is not supported. See Tokenizer.supportedLanguages for a * list of all supported languages. * * @param language The language to use for this tokenizer. * @param options */ constructor(language: ProgrammingLanguage, options?: TokenizerOptions); /** * Runs the parser on a given string. Returns a stringified version of the * abstract syntax tree. * * @param text The text string to parse */ tokenize(text: string): string; /** * Runs the parser on a given string. Returns a list of Tokens * containing the stringified version of the token and the * corresponding position. * * @param text The text string to parse */ generateTokens(text: string): Token[]; /** * Tokenizes the given node and its child nodes. It will create a list of Tokens * containing the stringified version of the token and the corresponding position. * * @param node The node (and child nodes) that will be tokenized. * @param tokens A list of tokens that will be filled during the execution of the function * @returns A tuple `(startRow, startCol)`, It represents * the starting position of the given tokenized node. */ private tokenizeNode; } //# sourceMappingURL=codeTokenizer.d.ts.map