[PT-167805291] Add opcode for ecrecover (#122)
* Add opcode for ecrecover * Update aebytecode * Extend signature bytes type used for ecrecover * Add ecrecover to changelog * Add some type specs * Please dialyzer
This commit is contained in:
committed by
Hans Svensson
parent
b669d2df1e
commit
dd26649f7d
@@ -574,14 +574,13 @@ pp(Code, Options, Option, PPFun) ->
|
||||
ok
|
||||
end.
|
||||
|
||||
|
||||
%% -------------------------------------------------------------------
|
||||
%% TODO: Tempoary parser hook below...
|
||||
|
||||
-spec parse_stdlib() -> none() | aeso_syntax:ast().
|
||||
parse_stdlib() ->
|
||||
lists:foldr(
|
||||
fun ({Lib, LibCode}, Acc) ->
|
||||
parse(LibCode, [{src_file, Lib}]) ++ Acc
|
||||
parse(LibCode, [{src_file, binary_to_list(Lib)}]) ++ Acc
|
||||
end,
|
||||
[],
|
||||
aeso_stdlib:stdlib_list()).
|
||||
@@ -593,8 +592,11 @@ sophia_type_to_typerep(String) ->
|
||||
catch _:_ -> {error, bad_type}
|
||||
end.
|
||||
|
||||
-spec parse(string(), aeso_compiler:options()) -> none() | aeso_syntax:ast().
|
||||
parse(Text, Options) ->
|
||||
parse(Text, sets:new(), Options).
|
||||
|
||||
-spec parse(string(), sets:set(), aeso_compiler:options()) -> none() | aeso_syntax:ast().
|
||||
parse(Text, Included, Options) ->
|
||||
%% Try and return something sensible here!
|
||||
case aeso_parser:string(Text, Included, Options) of
|
||||
@@ -616,6 +618,7 @@ parse(Text, Included, Options) ->
|
||||
parse_error(Pos, io_lib:format("could not find include file '~s'", [File]))
|
||||
end.
|
||||
|
||||
-spec parse_error(aeso_parse_lib:pos(), string()) -> none().
|
||||
parse_error(Pos, ErrorString) ->
|
||||
Error = io_lib:format("~s: ~s", [pos_error(Pos), ErrorString]),
|
||||
error({parse_errors, [Error]}).
|
||||
|
||||
Reference in New Issue
Block a user