Skip to content

Conversation

@lukaszsamson
Copy link
Collaborator

This PR replaces MetadataBuilder implementation with a mini compiler that is close to what elixir compiler does when traversing AST. It expands special forms and macros (if possible).
Key differences from elixir compiler:

  • It is designed to be error tolerant. In most places where elixir will throw off the compilation it attempt to continue
  • It does not do any tracing
  • It doesn't evaluate code. It means that it is not able to handle dynamic code and quoted defs
  • it is not able to expand local macros. This would require evaluating and compiling the code
  • it intercepts a few Kernel, Record macros (defmodule, def, defguard, defdelegate, @, defrecord, defprotocol, defimpl), attempts to traverse the code and extract info

@lukaszsamson lukaszsamson changed the title [WIP] Expand AST using Macro.Env API Expand AST using Macro.Env API Oct 5, 2024
@lukaszsamson lukaszsamson merged commit d1ebaad into master Oct 5, 2024
35 checks passed
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.

3 participants