Class JSXPrettyPrinterCodeStyle

java.lang.Object
com.io7m.jsx.prettyprint.JSXPrettyPrinterCodeStyle
All Implemented Interfaces:
JSXPrettyPrinterType, Closeable, AutoCloseable

public final class JSXPrettyPrinterCodeStyle extends Object implements JSXPrettyPrinterType
A pretty printer tailored to printing expressions that represent Lisp-like code.
  • Method Details

    • newPrinterWithWidthIndent

      public static JSXPrettyPrinterType newPrinterWithWidthIndent(Writer in_out, int in_width, int in_indent)
      Create a new pretty printer.
      Parameters:
      in_out - The output writer
      in_width - The maximum output width (note that unbreakable lines may exceed this width)
      in_indent - The indent for nested expressions
      Returns:
      A new printer
    • print

      public void print(SExpressionType e) throws IOException
      Description copied from interface: JSXPrettyPrinterType
      Format the given expression and print to the output.
      Specified by:
      print in interface JSXPrettyPrinterType
      Parameters:
      e - The expression
      Throws:
      IOException - On I/O errors
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException