Skip to content

compile time expansion support? #3

Open

Description

@beenotung

From the example in readme, it seems the expanded code is going to be executed in the runtime, instead of in the compile time. If this is the case, it seems similar to just inclining the function (with name conflict avoidance)

Activity

  1. danielpza commented on Oct 16, 2019

    @danielpza
    Member

    yeah, it is more like inlining and not actual macros, although I've thought about expansion in compile time I'm not planning to work on it in the near feature.

    The project is kind of dead right now tbh, I'm not using it myself.

  2. beenotung commented on Oct 16, 2019

    @beenotung
    Author

    I just made a compile-time expand macro tool, it's string-based, not AST-based though. But that should be fine as tsc can further check the generated file.
    https://github.com/beenotung/tsc-macro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions