-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add erl_scan #1342
base: release-0.6
Are you sure you want to change the base?
Add erl_scan #1342
Conversation
|
||
-export([keywords/0]). | ||
|
||
keywords() -> ['maybe', 'else']. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably needs a config option based on different OTP versions. Not sure what's the policy of supported OTP versions here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed more stubs for Cardputer example code: all/0 and configurable/0
https://github.com/pguyot/cardputer_erlang/blob/main/src/erl_features.erl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave them for now, we can add them in another PR. Especially after we decide if we need counterpart to init
module.
ea0519a
to
28dc5c6
Compare
I guess I have to remove all unsupported attributes (like 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. |
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. |
Signed-off-by: Jakub Gonet <[email protected]>
28dc5c6
to
1270ab3
Compare
erl_scan
anderl_anno
in.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 oncode
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