Skip to content

Commit

Permalink
Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Stanaszek committed May 18, 2018
1 parent 8fe16b2 commit 235af1b
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions src/ejabberd_config.erl
Original file line number Diff line number Diff line change
Expand Up @@ -928,33 +928,6 @@ log_configs(Node, RunId) ->
file:write_file(Dir ++ "remote_host_config", io_lib:fwrite("~p.\n", [LocalHostConfig]))
end.

pretty_term(Term) ->
Abstract = erl_syntax:abstract(Term),
AnnF = fun(Node) -> annotate_tuple(Node) end,
AnnAbstract = postorder(AnnF, Abstract),
HookF = fun(Node, Ctxt, Cont) ->
Doc = Cont(Node, Ctxt),
prettypr:above(prettypr:empty(), Doc)
end,
Io = erl_prettypr:format(AnnAbstract, [{hook, HookF}]),
io:put_chars(Io),
io:format(".~n").

annotate_tuple(Node) ->
case erl_syntax:type(Node) of
tuple -> erl_syntax:add_ann(tuple, Node);
_ -> Node
end.

%% from the erl_syntax manpage
postorder(F, Tree) ->
F(case erl_syntax:subtrees(Tree) of
[] -> Tree;
List -> erl_syntax:update_tree(Tree,
[[postorder(F, Subtree)
|| Subtree <- Group]
|| Group <- List])
end).

-spec groups_to_string(string(), [string()]) -> string().
groups_to_string(_Header, []) ->
Expand Down

0 comments on commit 235af1b

Please sign in to comment.