This repository has been archived by the owner on May 3, 2024. It is now read-only.
forked from richhickey/clojure-contrib
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pprint: Move gen-class expressions to separate file; refs #65
To avoid order-of-compilation issues, this patch puts the gen-class expressions for ColumnWriter and PrettyWriter in a separate file, rather than in the ns declarations.
- Loading branch information
Stuart Sierra
committed
Jan 31, 2010
1 parent
a0f80d1
commit 3275810
Showing
4 changed files
with
34 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
;;; gen_class.clj: generate statically-named classes for pprint | ||
|
||
(ns clojure.contrib.pprint.gen-class) | ||
|
||
(gen-class :name clojure.contrib.pprint.ColumnWriter | ||
:impl-ns clojure.contrib.pprint.ColumnWriter | ||
:extends java.io.Writer | ||
:init init | ||
:constructors {[java.io.Writer Integer] [], | ||
[java.io.Writer] []} | ||
:methods [[getColumn [] Integer] | ||
[getLine [] Integer] | ||
[getMaxColumn [] Integer] | ||
[setMaxColumn [Integer] Void] | ||
[getWriter [] java.io.Writer]] | ||
:state state) | ||
|
||
(gen-class :name clojure.contrib.pprint.PrettyWriter | ||
:impl-ns clojure.contrib.pprint.ColumnWriter | ||
:extends clojure.contrib.pprint.ColumnWriter | ||
:init init | ||
:constructors {[java.io.Writer Integer Object] [java.io.Writer Integer]} | ||
:methods [[startBlock [String String String] void] | ||
[endBlock [] void] | ||
[newline [clojure.lang.Keyword] void] | ||
[indent [clojure.lang.Keyword Integer] void] | ||
[getMiserWidth [] Object] | ||
[setMiserWidth [Object] void] | ||
[setLogicalBlockCallback [clojure.lang.IFn] void]] | ||
:exposes-methods {write col_write} | ||
:state pwstate) |