import * as Expr from "../parser/Expression"; import * as Stmt from "../parser/Statement"; /** Creates a pretty-printed representation of an expression to ease debugging. */ export declare class AstPrinter implements Expr.Visitor { private indent; /** * Pretty-prints an expression for debugging purposes. * @param expression the expression to pretty-print. */ print(expression: Expr.Expression): string; visitAnonymousFunction(e: Expr.Function): string; visitBinary(e: Expr.Binary): string; visitCall(e: Expr.Call): string; visitDottedGet(e: Expr.DottedGet): string; visitIndexedGet(e: Expr.IndexedGet): string; visitGrouping(e: Expr.Grouping): string; visitLiteral(e: Expr.Literal): string; visitArrayLiteral(e: Expr.ArrayLiteral): string; visitAALiteral(e: Expr.AALiteral): string; visitDottedSet(e: Stmt.DottedSet): string; visitIndexedSet(e: Stmt.IndexedSet): string; visitIncrement(e: Stmt.Increment): string; visitUnary(e: Expr.Unary): string; visitVariable(expression: Expr.Variable): string; /** * Wraps an expression in parentheses to make its grouping visible during debugging. * * @param name The name of the expression type being printed. * @param expressions any subexpressions that need to be stringified as well. */ private parenthesize; }