tree_node() = #{type => tree_node_type(), attrs => #{}, node_attrs => #{}, content => [tree_node()]}
tree_node_type() = root | function | clause | match | tuple | atom | integer | float | string | char | binary | binary_element | var | call | remote | 'case' | case_expr | case_clauses | 'fun' | named_fun | query | 'try' | try_catch | try_case | try_after | 'if' | 'catch' | 'receive' | receive_after | receive_case | nil | cons | map | map_field_assoc | map_field_exact | lc | lc_expr | generate | bc | bc_expr | b_generate | op | record | record_field | record_index | block | module | type | callback | export | export_type | remote_type | type | ann_type | paren_type | any
attr/2 | |
beam_to_erl/2 | If the beam was not compiled with debug_info the code generated by this function will look really ugly. |
beam_to_string/1 | If the beam was not compiled with debug_info the code generated by this function will look really ugly. |
consult/1 | Like file:consult/1 but for strings and binaries. |
content/1 | |
eval/1 | Evaluates the erlang expression in the string provided. |
eval/2* | |
get_location/1* | |
get_text/1* | |
is_dot/1* | |
node_attr/2 | |
parse_tree/1 | Equivalent to parse_tree([], Source). |
parse_tree/2 | |
parse_tree/3 | Parses code in a string or binary format and returns the parse tree. |
source_encoding/1* | |
split_when/2* | Splits a list whenever an element satisfies the When predicate. |
split_when/3* | |
to_map/1* | Converts a parse tree form the abstract format to a map based repr. |
to_str/1 | |
token_to_map/1* | |
type/1 |
attr(Key::term(), Node::tree_node()) -> term() | undefined
beam_to_erl(BeamPath::beam_lib:beam(), ErlPath::string()) -> ok
If the beam was not compiled with debug_info the code generated by this function will look really ugly
beam_to_string(BeamPath::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
consult(Source::string() | binary()) -> [term()]
Like file:consult/1 but for strings and binaries.
content(Node::tree_node()) -> [tree_node()]
eval(Source::string() | binary()) -> term()
Evaluates the erlang expression in the string provided.
eval(Source::string() | binary(), Bindings::orddict:orddict()) -> term()
get_location(Attrs) -> any()
get_text(Attrs) -> any()
is_dot(X1::tuple()) -> boolean()
node_attr(Key::term(), Node::tree_node()) -> term() | undefined
parse_tree(Source::string() | binary()) -> tree_node()
Equivalent to parse_tree([], Source).
parse_tree(IncludeDirs::[string()], Source::string() | binary()) -> tree_node()
parse_tree(IncludeDirs::[string()], FileName::file:name_all() | undefined, Source::string() | binary()) -> tree_node()
Parses code in a string or binary format and returns the parse tree.
source_encoding(Source::binary() | list()) -> latin1 | utf8
split_when(When::function(), List::list()) -> list()
Splits a list whenever an element satisfies the When predicate.
Returns a list of lists where each list includes the matched element
as its last one.
E.g.
split_when(fun (X) -> $. == X end, "a.b.c") = ["a.", "b.", "c"]
NOTE: Copied from ktn_lists not to bring the whole erlang-katana
repo as a dependency here
split_when(When, Tail, Results) -> any()
to_map(ListParsed::term()) -> tree_node() | [tree_node()]
Converts a parse tree form the abstract format to a map based repr.
To do
to_str(Arg::binary() | list() | atom() | integer()) -> string()
token_to_map(X1) -> any()
type(X1::tree_node()) -> atom()
Generated by EDoc