Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Teach syntex about some built-in macros #45

Open
mystor opened this issue May 7, 2016 · 0 comments
Open

Teach syntex about some built-in macros #45

mystor opened this issue May 7, 2016 · 0 comments

Comments

@mystor
Copy link

mystor commented May 7, 2016

It would be cool if syntex could be taught about some of the common built-in macros. For example, if println! and vec! were "expanded" to be themselves, but syntex was made aware that they accepted a list of expressions as arguments, and that the expressions should be expanded as usual. I'll admit that I don't know exactly in the tree where that change would have to be made, so I don't know how hard it would be to get that to work without significant changes to syntex_syntax.

A much more complex, but also cool, thing would be to also support macro_rules! expansion within syntex. This would mean that if enough built-in macros were used, and no compiler plugins were used, syntex could theoretically be used to expand almost any macro tree. I don't think this is a good idea for complexity reasons, but it would be cool at least :).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant