PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/src/clj/clojure/pprint.clj

https://github.com/cpulsford/clojure
Clojure | 48 lines | 28 code | 10 blank | 10 comment | 0 complexity | 665b97b72c29f7f96ee2c5126eb700f7 MD5 | raw file
  1. ;;; pprint.clj -- Pretty printer and Common Lisp compatible format function (cl-format) for Clojure
  2. ; Copyright (c) Rich Hickey. All rights reserved.
  3. ; The use and distribution terms for this software are covered by the
  4. ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
  5. ; which can be found in the file epl-v10.html at the root of this distribution.
  6. ; By using this software in any fashion, you are agreeing to be bound by
  7. ; the terms of this license.
  8. ; You must not remove this notice, or any other, from this software.
  9. ;; Author: Tom Faulhaber
  10. ;; April 3, 2009
  11. (ns
  12. ^{:author "Tom Faulhaber",
  13. :doc "A Pretty Printer for Clojure
  14. clojure.pprint implements a flexible system for printing structured data
  15. in a pleasing, easy-to-understand format. Basic use of the pretty printer is
  16. simple, just call pprint instead of println. More advanced users can use
  17. the building blocks provided to create custom output formats.
  18. Out of the box, pprint supports a simple structured format for basic data
  19. and a specialized format for Clojure source code. More advanced formats,
  20. including formats that don't look like Clojure data at all like XML and
  21. JSON, can be rendered by creating custom dispatch functions.
  22. In addition to the pprint function, this module contains cl-format, a text
  23. formatting function which is fully compatible with the format function in
  24. Common Lisp. Because pretty printing directives are directly integrated with
  25. cl-format, it supports very concise custom dispatch. It also provides
  26. a more powerful alternative to Clojure's standard format function.
  27. See documentation for pprint and cl-format for more information or
  28. complete documentation on the the clojure web site on github.",
  29. :added "1.2"}
  30. clojure.pprint
  31. (:refer-clojure :exclude (deftype)))
  32. (load "pprint/utilities")
  33. (load "pprint/column_writer")
  34. (load "pprint/pretty_writer")
  35. (load "pprint/pprint_base")
  36. (load "pprint/cl_format")
  37. (load "pprint/dispatch")
  38. nil