Add function to decode VM values to Sophia abstract syntax #519

Merged
zxq9 merged 4 commits from decode-vm-to-sophia into master 2019-02-26 17:00:49 +09:00
Showing only changes of commit f866e24624 - Show all commits

View File

@ -307,6 +307,8 @@ expr_p(P, E = {app, _, F = {Op, _}, Args}) when is_atom(Op) ->
{prefix, [A]} -> prefix(P, Op, A);
_ -> app(P, F, Args)
end;
expr_p(_, {app, _, C={Tag, _, _}, []}) when Tag == con; Tag == qcon ->
expr_p(0, C);
expr_p(P, {app, _, F, Args}) ->
app(P, F, Args);
%% -- Constants