Skip to content
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

Added safe_split to Ast.Module #743

Merged
merged 2 commits into from
May 19, 2024
Merged

Added safe_split to Ast.Module #743

merged 2 commits into from
May 19, 2024

Conversation

scohen
Copy link
Collaborator

@scohen scohen commented May 17, 2024

When lexical deals with modules, they can either be erlang or elixir modules. However, Module.split will raise an exception when called on an erlang module. We've implemented safe_split in a couple of places, and this centralizes the base logic.

Safe split will return the type of module, and if it's an erlang or elixir module. It also allows the module's components to be either in bianry or atom form.

@scohen scohen requested review from zachallaun and scottming May 17, 2024 15:29
When lexical deals with modules, they can either be erlang or elixir
modules. However, Module.split will raise an exception when called on
an erlang module. We've implemented safe_split in a couple of places,
and this centralizes the base logic.

Safe split will return the type of module, and if it's an erlang or
elixir module. It also allows the module's components to be either in
bianry or atom form.
@scohen scohen merged commit 684c002 into main May 19, 2024
9 checks passed
@scohen scohen deleted the safe-split branch May 19, 2024 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants