jc-marked
Version:
Markdown AST (Abstract syntax tree) parser based on finite-state machine (FSM).
29 lines (28 loc) • 744 B
TypeScript
import { articleInfos } from "../types";
import type { treeItem, elem } from "../types";
declare class Tree {
private _nodes;
private _lines;
private _tree;
private _currentState;
private _nextState;
private _paragraphFlag;
private _counter;
private _deepth;
private _base_order;
constructor(text: string | treeItem[], deepth?: number, lines?: string[], baseOrder?: string);
get lines(): string[];
get nodes(): elem[];
get tree(): treeItem[];
get infos(): articleInfos;
get res(): {
infos: articleInfos;
tree: treeItem[];
};
run(): void;
private _handelItem;
private _runActions;
private _countNewState;
private _enterState;
}
export { Tree };