export declare const INDENT_TYPE_TOP_LEVEL = "top-level"; export declare const INDENT_TYPE_BLOCK_LEVEL = "block-level"; export declare const INDENT_TYPE_TABULAR_BLOCK_LEVEL = "tabular-block-level"; /** * Manages indentation levels. * * There are two types of indentation levels: * * - BLOCK_LEVEL : increased by open-parenthesis * - TOP_LEVEL : increased by RESERVED_CLAUSE words */ export default class Indentation { private indent; private tabWidthIndent; private indentTypes; /** * @param {string} indent A string to indent with */ constructor(indent: string, tabWidthIndent?: string); /** * Returns indentation string for single indentation step. */ getSingleIndent(): string; /** * Returns current indentation level */ getLevel(): number; getIndentItems(): Array; /** * Increases indentation by one top-level indent. */ increaseTopLevel(): void; /** * Increases indentation by one block-level indent. */ increaseBlockLevel(): void; /** * In tabular style, increases block-level indent by tab width */ increaseTabularBlockLevel(): void; /** * Decreases indentation by one top-level indent. * Does nothing when the previous indent is not top-level. */ decreaseTopLevel(): void; /** * Decreases indentation by one block-level indent. * If there are top-level indents within the block-level indent, * throws away these as well. */ decreaseBlockLevel(): void; /** * Decreases indentation by one block-level indent in tabular style. * If there are top-level indents within the block-level indent, * throws away these as well. * 制表风格下,由于采用10格补全空格法(padEnd)。在BlockLevel场景下会导致缩进过多,在括号场景下,丢失缩进的问题。 * 这是因为没有更细粒度控制缩进导致。所以在制表风格下 结合TabWidth进一步控制 */ decreaseTabularBlockLevel(): void; }