import { CommandNode, ListNode, Node, PipeNode, Pos as Position } from './node'; import { Item, ItemType } from './lex'; export declare enum Mode { ParseComments = 1, SkipFuncCheck = 2 } export declare function New(name: string, funcs?: Map[]): Tree; export declare class Tree { Name: string; ParseName: string; Root: ListNode | null; Mode: Mode; text: string; private funcs; private lex; private tokenArray; private peekCount; private vars; private treeSet; private actionLine; private rangeDepth; constructor(name: string, funcs?: Map[]); copy(): Tree | null; private setProperties; next(): Item; backup(): void; backup2(t1: Item): void; backup3(t2: Item, t1: Item): void; peek(): Item; nextNonSpace(): Item; peekNonSpace(): Item; errorContext(node: Node): [string, string]; errorf(format: string, ...args: any[]): never; error(err: Error): never; expect(expected: ItemType, context: string): Item; expectOneOf(expected1: ItemType, expected2: ItemType, context: string): Item; unexpected(token: Item, context: string): never; recover(errp: { err: Error | null; }): void; private newList; private newText; private newAction; private newComment; private newIf; private newRange; private newTemplate; private newWith; private newPipeline; private newCommand; private newChain; textOrAction(): Node; action(): Node; parse(text: string, leftDelim: string, rightDelim: string, treeSet: Map, funcs?: Map[]): [Tree, Error | null]; private startParse; private stopParse; private doParse; private parseDefinition; breakControl(pos: Position, line: number): Node; continueControl(pos: Position, line: number): Node; endControl(): Node; elseControl(): Node; ifControl(): Node; rangeControl(): Node; withControl(): Node; templateControl(): Node; blockControl(): Node; itemList(): [ListNode, Node]; private parseTemplateName; private popVars; pipeline(context: string, end: ItemType): PipeNode; command(): CommandNode; operand(): Node | undefined; term(): Node | undefined; private checkPipeline; private useVar; private newVariable; private newField; private newNumber; private simplifyComplex; private newBreak; private newContinue; private newDot; private newNil; private newBool; private newString; private newEnd; private newDefine; private unquote; private clearActionLine; private add; private isEmptyTree; private hasFunction; private parseControl; } export declare function parse(name: string, text: string, leftDelim?: string, rightDelim?: string, funcs?: Map[]): [Map, Error | null]; export declare function IsEmptyTree(node: Node | null): boolean;