Implement aeb_fate_code:strip_init_function/1
This commit is contained in:
parent
72b2a581d5
commit
d272e821b2
@ -19,6 +19,7 @@
|
|||||||
, serialize/3
|
, serialize/3
|
||||||
, serialize_code/1
|
, serialize_code/1
|
||||||
, serialize_signature/1
|
, serialize_signature/1
|
||||||
|
, strip_init_function/1
|
||||||
, symbol_identifier/1
|
, symbol_identifier/1
|
||||||
, symbols/1
|
, symbols/1
|
||||||
]).
|
]).
|
||||||
@ -92,6 +93,13 @@ insert_annotation(comment =_Type, Line, Comment, FCode) ->
|
|||||||
Value = aeb_fate_data:make_string(Comment),
|
Value = aeb_fate_data:make_string(Comment),
|
||||||
update_annotations(FCode, #{ Key => Value }).
|
update_annotations(FCode, #{ Key => Value }).
|
||||||
|
|
||||||
|
strip_init_function(#fcode{ functions = Funs,
|
||||||
|
symbols = Syms } = FCode) ->
|
||||||
|
Id = symbol_identifier(<<"init">>),
|
||||||
|
Funs1 = maps:remove(Id, Funs),
|
||||||
|
Syms1 = maps:remove(Id, Syms),
|
||||||
|
FCode#fcode{ functions = Funs1, symbols = Syms1 }.
|
||||||
|
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
%%% Serialization
|
%%% Serialization
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user