clj_reader
Clojerl reader.
Reads an input string (or'erlang.io.IPushbackReader'
) and
returns a Clojerl form.
Summary
Types
Functions
-
location_meta(X)
Extracts the location information from
X
's metadata. -
read(Src)
Read a form from the provided binary
Src
. -
read(Src, Opts)
Reads the next form from the input.
-
remove_location(Meta)
Removes the location information from
Meta
.
Types
location()
-type location() ::
#{line => non_neg_integer(),
column => non_neg_integer(),
file => binary() | undefined}.
opts()
-type opts() ::
#{'read-cond' => allow | preserve,
features => 'clojerl.Set':type(),
eof => eofthrow | ok,
file => file:filename_all(),
time => boolean(),
'io-reader' => 'erlang.io.IPushbackReader':type()}.
Functions
location_meta(X)
-spec location_meta(any()) -> location() | undefined.
Extracts the location information from X
's metadata.
read(Src)
-spec read(binary()) -> any().
Read a form from the provided binary Src
.
read(Src, Opts)
-spec read(binary(), opts()) -> any().
Reads the next form from the input. Returns the form or throws if there is no form to read.
remove_location(Meta)
-spec remove_location(any()) -> any().
Removes the location information from Meta
.