Rewrite-cljs Api Documentation

Version: 0.3.0

rewrite-clj.reader

ignore

(ignore reader)

Ignore the next character.

js-contains

(js-contains c)

linebreak?

(linebreak? c)

next

(next reader)

Read next char.

peek

(peek reader)

Peek next char.

read-include-linebreak

(read-include-linebreak reader)

Read until linebreak and include it.

read-n

(read-n reader node-tag read-fn p? n)

Call the given function on the given reader until n values matching p? have been collected.

read-repeatedly

(read-repeatedly reader read-fn)

Call the given function on the given reader until it returns a non-truthy value.

read-until

(read-until reader p?)

Read until a char fulfills the given condition. Ignores the matching char.

read-while

(read-while reader p? & [eof?])

Read while the chars fulfill the given condition. Ignores the unmatching char.

read-with-meta

(read-with-meta reader read-fn)

Use the given function to read value, then attach row/col metadata.

string->edn

(string->edn s)

Convert string to EDN value.

string-reader

(string-reader s)

Create reader for strings.

throw-reader

(throw-reader reader fmt & data)

Throw reader exception, including line/column.

whitespace-or-boundary?

(whitespace-or-boundary? c)

whitespace?

(whitespace? c)