Skip to content

compile time expansion support? #3

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

Open
beenotung opened this issue Oct 16, 2019 · 2 comments
Open

compile time expansion support? #3

beenotung opened this issue Oct 16, 2019 · 2 comments

Comments

@beenotung
Copy link

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)

@danielpza
Copy link
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.

@beenotung
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants