Prepared for REPL usage (#218)
* Prepared for REPL usage Exposed expr parsing ets init in constant Exposing and fixing exposed expr This will be squashed either Expose letdef Error handling exposed autoimport remove unnecessary changes Fix types Parser update Expose body parser remove map_get warning make dialyzer happy * Formatting Co-Authored-By: Hans Svensson <hanssv@gmail.com> Co-authored-by: Hans Svensson <hanssv@gmail.com>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
| pp_assembler
|
||||
| pp_bytecode
|
||||
| no_code
|
||||
| keep_included
|
||||
| {backend, aevm | fate}
|
||||
| {include, {file_system, [string()]} |
|
||||
{explicit_files, #{string() => binary()}}}
|
||||
@@ -650,8 +651,9 @@ pp_fate_type(T) -> io_lib:format("~w", [T]).
|
||||
|
||||
%% -------------------------------------------------------------------
|
||||
|
||||
-spec sophia_type_to_typerep(string()) -> {error, bad_type} | {ok, aeb_aevm_data:type()}.
|
||||
sophia_type_to_typerep(String) ->
|
||||
{ok, Ast} = aeso_parser:type(String),
|
||||
Ast = aeso_parser:run_parser(aeso_parser:type(), String),
|
||||
try aeso_ast_to_icode:ast_typerep(Ast) of
|
||||
Type -> {ok, Type}
|
||||
catch _:_ -> {error, bad_type}
|
||||
|
||||
Reference in New Issue
Block a user