AtomVM icon indicating copy to clipboard operation
AtomVM copied to clipboard

Add erl_scan

Open jgonet opened this issue 1 year ago • 3 comments

  • Vendors erl_scan and erl_anno in.
  • Adds a stub of erl_features

This is a part of work that ultimately will allow building REPL in the AtomVM in the browser. Next is adding erl_parse along with intermediate compiling .yrl to CMake and then adding simple REPL implementation (not supporting modules as they depend on code module) to webasm.

Currently, it uses unsupported line tag 19. I'm not accustomed with stacktraces yet so I'm waiting for the initial feedback to solve this issue.

Oneliner to find module's static deps: cat erl_scan.erl | egrep -o '\w+:\w+' | egrep -v "error:|_:|m:" | sort | uniq | cut -f1 -d":"

These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

jgonet avatar Oct 15 '24 13:10 jgonet

I guess I have to remove all unsupported attributes (like -doc) from vendored code and replace it with doxygen comments?

Will mark this PR as a draft after initial feedback. Waiting for CI to add license identifier to files.

jgonet avatar Oct 15 '24 14:10 jgonet

I guess I have to remove all unsupported attributes (like -doc) from vendored code and replace it with doxygen comments?

Will mark this PR as a draft after initial feedback. Waiting for CI to add license identifier to files.

You could use a macro that generates an empty attribute before OTP27 and the doc attribute from OTP27. I've seen this trick on a slide at CodeBEAM Europe 2024.

pguyot avatar Oct 15 '24 14:10 pguyot

For the time being we are still using edoc, so the new -doc() style isn't supported by our build system. I would love to move to ex_doc, this will require some planning and effort to coordinate.

UncleGrumpy avatar Oct 15 '24 15:10 UncleGrumpy

This will be handled in a different way, closing.

jgonet avatar Nov 25 '24 05:11 jgonet