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

Prototype: Macro expansion / lowering #329

Closed
wants to merge 15 commits into from
Closed

Prototype: Macro expansion / lowering #329

wants to merge 15 commits into from

Commits on Jul 8, 2023

  1. WIP: Backquote expansion

    Begin working on macro expansion. So far this just expands backquotes.
    
    Also some changes to SyntaxNode make it possible to construct ASTs from
    these programmatically, without the source being available. And some
    basic support to allow us to track provenance through syntax
    transformations.
    c42f committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    1e333b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9edd433 View commit details
    Browse the repository at this point in the history
  3. Interop: Expand macros taking Expr

    Allow `macroexpand` to call macros which only have an implementation in
    terms of the `Expr` data structure.
    
    Also add a `__macroname__` argument to pass the expression of the macro
    name as it appeared at macro invocation. Implement `@__FILE__`
    `@__LINE__` and `@__COLUMN__` in terms of this.
    c42f committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    45effcb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cd846e0 View commit details
    Browse the repository at this point in the history
  5. Handle macros which call macros more correctly

    Macros expansion of macros which emit macros as part of their AST needs
    care when that AST contains interpolations: We don't want the second
    macro expansion to see the hygenic_scope expression. One way to do this
    is to transform hygenic_scope back into `SyntaxLiteral` on the fly.
    
    Also fix auto-escaping for expressions arising from the original scope
    by adding the necessary number of Expr(:esc)
    c42f committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    e61fdb2 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2023

  1. Configuration menu
    Copy the full SHA
    b43c443 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. Configuration menu
    Copy the full SHA
    fe69bf0 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. Only test macroexpand on 1.9+

    One of the many internal Base things we're using is likely different on
    <= 1.8
    c42f committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    d672db2 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2023

  1. Configuration menu
    Copy the full SHA
    d5193ca View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. WIP lowering

    c42f committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    fa096e8 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2023

  1. lowering WIP

    c42f committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    4ffae03 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2023

  1. WIP

    c42f committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    9a54e2e View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2023

  1. Configuration menu
    Copy the full SHA
    f72a1d0 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2023

  1. Fix ccall prototype implementation

    Plus subtle fixes to macro expansion prototype
    c42f committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    657a23c View commit details
    Browse the repository at this point in the history
  2. Minor fix for ccall prototype

    c42f committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    81c5dc2 View commit details
    Browse the repository at this point in the history