S
S
Sergey2019-09-10 14:17:53
Erlang
Sergey, 2019-09-10 14:17:53

How to deal with records in erl_eval?

Hello.
The task is to use dynamically loaded code in Erlang.
The code should not be a module, but should be executed dynamically.
The general scheme is as follows, we use:
erl_scan:string - to tokenize the text into a list of tokens (lexer).
erl_parse:parse_exprs -- converts a list of tokens into an AST.
erl_eval:exprs -- executes an AST with some parameters.
This combination does not work with -include() and other syntactic sugar in the form of records and -define.
For this to work, you need to change something somewhere in the parser area, or even the parser itself.
Maybe I don't know something?
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question