Introduce debugging symbols #915

Merged
ghallak merged 92 commits from ghallak/ann-fate-ops into master 2023-06-13 20:36:48 +09:00
Showing only changes of commit a4d1479cc5 - Show all commits

View File

@ -58,6 +58,8 @@
| {contract_code, string()} %% for CREATE, by name
| {typerep, ftype()}.
-type fann() :: [ {line, aeso_syntax:ann_line()} ].
-type fexpr() :: {lit, flit()}
| nil
| {var, var_name()}
@ -374,6 +376,10 @@ to_fcode(Env, [{namespace, _, {con, _, Con}, Decls} | Code]) ->
Env1 = decls_to_fcode(Env#{ context => {namespace, Con} }, Decls),
to_fcode(Env1, Code).
-spec to_fann(aeso_syntax:ann()) -> fann().
to_fann(Ann) ->
proplists:lookup_all(line, Ann).
-spec decls_to_fcode(env(), [aeso_syntax:decl()]) -> env().
decls_to_fcode(Env, Decls) ->
%% First compute mapping from Sophia names to fun_names and add it to the