Skip to content

Commit

Permalink
Remove attributes in Core forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Baha committed Jul 19, 2017
1 parent 195e4ee commit e484586
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/rev_erlang_gui.erl
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,16 @@ loadFile(File) ->
Frame = ref_lookup(?FRAME),
case compile:file(File, [to_core,binary]) of
{ok, _, CoreForms} ->
NoAttsCoreForms = cerl:update_c_module(CoreForms,
cerl:module_name(CoreForms),
cerl:module_exports(CoreForms),
[],
cerl:module_defs(CoreForms)),
Stripper = fun(Tree) -> cerl:set_ann(Tree, []) end,
CleanCoreForms = cerl_trees:map(Stripper, CoreForms),
CleanCoreForms = cerl_trees:map(Stripper, NoAttsCoreForms),
FunDefs = cerl:module_defs(CleanCoreForms),
CodeText = ref_lookup(?CODE_TEXT),
wxTextCtrl:setValue(CodeText,core_pp:format(CleanCoreForms)),
wxTextCtrl:setValue(CodeText, core_pp:format(CleanCoreForms)),
Status = ref_lookup(?STATUS),
ref_add(?STATUS, Status#status{loaded = {true,FunDefs}}),
LeftNotebook = ref_lookup(?LEFT_NOTEBOOK),
Expand Down

0 comments on commit e484586

Please sign in to comment.