Improve pretty printing the code AST
This commit is contained in:
parent
70ad303e16
commit
db1c0fa05a
@ -17,11 +17,12 @@ line({symbol, Line, _}) -> Line.
|
|||||||
symbol_name({symbol, _, Name}) -> Name.
|
symbol_name({symbol, _, Name}) -> Name.
|
||||||
|
|
||||||
pp(Ast) ->
|
pp(Ast) ->
|
||||||
%% TODO: Actually do *Pretty* printing.
|
%% io:format("Tree:\n~p\n",[Ast]),
|
||||||
io:format("~p~n", [Ast]).
|
String = prettypr:format(aeso_pretty:decls(Ast, [])),
|
||||||
|
io:format("Ast:\n~s\n", [String]).
|
||||||
|
|
||||||
pp_typed(TypedAst) ->
|
pp_typed(TypedAst) ->
|
||||||
String = prettypr:format(aeso_pretty:decls(TypedAst, [show_generated])),
|
|
||||||
%% io:format("Typed tree:\n~p\n",[TypedAst]),
|
%% io:format("Typed tree:\n~p\n",[TypedAst]),
|
||||||
io:format("Type info:\n~s\n",[String]).
|
String = prettypr:format(aeso_pretty:decls(TypedAst, [show_generated])),
|
||||||
|
io:format("Type ast:\n~s\n",[String]).
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user