import { AbstractJastVisitor } from '../jast-visitors'; import { type Argument, type AstNode, type CompoundClause, type CompoundOperator, type Field, type FunctionOperand, type FunctionString, type Jast, type KeywordOperand, type ListOperand, type NotClause, type NotClauseOperator, type Operator, type OrderBy, type OrderByDirection, type OrderByField, type OrderByOperator, type Predicate, type PredicateOperator, type Property, type Query, type TerminalClause, type ValueOperand } from '../types'; import { type Doc } from './types'; type OperatorCase = 'lower' | 'upper' | 'preserve'; export type PrintOptions = { /** * Whether to uppercase, lowercase, or preserve the case of operators (terminal, compound, predicated and order by operators) in the printed JQL. * lower: make all operators lowercase * upper: make all operators uppercase * preserve: keep the case of the terminal and predicated operators but compound operators will be lowercase * and order by uppercase (as original) */ operatorCase?: OperatorCase; }; export declare class AstToDocVisitor extends AbstractJastVisitor { private operatorCase; constructor({ operatorCase }?: PrintOptions); visitArgument(argument: Argument): Doc; /** * Visit each of the provided nodes and form a new array with each `Doc` joined by the provided separator. */ joinNodes(nodes: T[], separator?: Doc): Doc[]; visitCompoundClause(compoundClause: CompoundClause): Doc; visitCompoundOperator(compoundOperator: CompoundOperator): Doc; visitField(field: Field): Doc; visitFunction(functionString: FunctionString): Doc; visitFunctionOperand(functionOperand: FunctionOperand): Doc; visitKeywordOperand(keywordOperand: KeywordOperand): Doc; visitListOperand(listOperand: ListOperand): Doc; visitOperator(operator: Operator): Doc; visitOrderBy(orderBy: OrderBy): Doc; visitOrderByDirection(orderByDirection: OrderByDirection): Doc; visitOrderByField(orderByField: OrderByField): Doc; visitOrderByOperator(orderByOperator: OrderByOperator): Doc; visitPredicate(predicate: Predicate): Doc; visitPredicateOperator(predicateOperator: PredicateOperator): Doc; visitProperty(property: Property): Doc; visitQuery(query: Query): Doc; visitTerminalClause(terminalClause: TerminalClause): Doc; visitValueOperand(valueOperand: ValueOperand): Doc; visitNotClause(notClause: NotClause): Doc; visitNotClauseOperator(notClauseOperator: NotClauseOperator): Doc; visitChildren(): Doc; protected defaultResult(): Doc; } export declare const printAstToDoc: (jast: Jast, options?: PrintOptions) => Doc; export {};