ktn_code (katana_code v2.5.0)
View SourceSummary
Types
Should eventually become beam_lib:beam(), once that's exposed (https://github.com/erlang/otp/pull/7534)
Functions
If the beam was not compiled with debug_info the code generated by this function will look really ugly
If the beam was not compiled with debug_info the code generated by this function will look really ugly
Like file:consult/1 but for strings and binaries.
Evaluates the Erlang expression in the string provided.
Parses code in a string or binary format and returns the parse tree.
Types
-type beam_lib_beam() :: file:filename() | binary().
Should eventually become beam_lib:beam(), once that's exposed (https://github.com/erlang/otp/pull/7534)
-type tree_node() :: #{type => tree_node_type(), attrs => map(), node_attrs => map(), content => [tree_node()]}.
-type tree_node_type() :: atom().
Functions
-spec beam_to_erl(beam_lib_beam(), string()) -> ok.
If the beam was not compiled with debug_info the code generated by this function will look really ugly
-spec beam_to_string(beam_lib_beam()) -> {ok, string()} | {error, beam_lib, term()}.
If the beam was not compiled with debug_info the code generated by this function will look really ugly
Like file:consult/1 but for strings and binaries.
Evaluates the Erlang expression in the string provided.
Parses code in a string or binary format and returns the parse tree.
-spec type(tree_node()) -> undefined | tree_node_type().