Atom-safe reader for Erlang term files such as .app, .app.src,
rebar.lock and rebar.config.
:file.consult/1 would intern every atom found in third-party files. This
reader instead produces the same neutral representation as
VulnCheck.Literal:
- atoms become
{:atom, "name"} - tuples become
{:tuple, [elements]} - maps become
{:map, [{key, value}]} - strings (
"...") and binaries (<<"...">>) become Elixir binaries - numbers and lists are kept as they are
Only data terms are supported; funs, records with expressions and macros
are rejected with {:error, reason}.
Summary
Functions
Extracts atom names from a list of atom terms, ignoring other terms.
Parses all dot-terminated terms contained in source.
Reads and parses a file of dot-terminated Erlang terms.
Looks up key in a proplist of {:tuple, [{:atom, key}, value]} entries.
Types
Functions
Extracts atom names from a list of atom terms, ignoring other terms.
Parses all dot-terminated terms contained in source.
Reads and parses a file of dot-terminated Erlang terms.
Looks up key in a proplist of {:tuple, [{:atom, key}, value]} entries.