misaki.compiler.default.reader documentation
S-exp Reader.
create-exception
(create-exception ex filename line)
Create java.lang.RuntimeException with base exception, filename and error line number.
create-pushback-reader-with-line
(create-pushback-reader-with-line in)
Create an instance extending java.io.PushbackReader and implementing clojure.lang.IDeref.
This instance counts
ewline and return if you deref instance.
(let [r (create-pushback-reader-with-line (io/reader "test.clj"))]
; basic use
(.read r)
(.unread r (int \x))
; get newline count
(println @r))
read-from-reader
(read-from-reader rdr & {:keys [path]})
Read all S-exps from java.io.Reader.
read-from-string
(read-from-string s & {:keys [path]})
Read all S-exps from java.lang.String
read-sexp
(read-sexp rdr & {:keys [path]})
Read one S-exp.
If S-exp has format error, throw java.lang.RuntimeException with specified path and line number.
skip-to-token
(skip-to-token rdr)
Skip java.io.Reader to next token.
Space, Tab, CR, LN, clojure comment are skipped.