Add fann type and to_fann fun
This commit is contained in:
parent
7bac15949c
commit
a4d1479cc5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user