Module power_shell

Implements Erlang interpreter via eval/3 function.

Copyright © (c) WhatsApp Inc. and its affiliates. All rights reserved.

Authors: Maxim Fedorov (maximfca@gmail.com).

Description

Implements Erlang interpreter via eval/3 function.

Allows to 'call' functions that are not exported by interpreting function code.

Function Index

eval/3Performs erlang:apply(Module, Fun, Args) by evaluating AST of Module:Fun.
eval/4Performs erlang:apply(Module, Fun, Args) by evaluating AST of Module:Fun.

Function Details

eval/3

eval(Module::module(), Fun::atom(), Args::[term()]) -> term()

Module: Module name, must be either loaded or discoverable with code:which() or filelib:find_source()
Fun: function name, may not be exported
Args: List of arguments

Performs erlang:apply(Module, Fun, Args) by evaluating AST of Module:Fun.

eval/4

eval(Module::module(), Fun::atom(), Args::[term()], FunMap::power_shell_cache:function_map()) -> term()

Module: Module name, must be either loaded or discoverable with code:which() or filelib:find_source()
Fun: function name, may not be exported
Args: List of arguments
FunMap: AST of all functions defined in Mod, as returned by power_shell_cache:get_module(Mod) Should be used if starting power_shell_cache gen_server is undesirable.

Performs erlang:apply(Module, Fun, Args) by evaluating AST of Module:Fun.


Generated by EDoc