diff --git a/src/aeso_ast_to_fcode.erl b/src/aeso_ast_to_fcode.erl index c83d01a..89a1b47 100644 --- a/src/aeso_ast_to_fcode.erl +++ b/src/aeso_ast_to_fcode.erl @@ -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