3 ms·
> Can this be implemented in rust itself, as part of the compilation ? I'm not sure what you mean by 'in rust itself'. Do you mean as part of the rust compiler
by killercup 11y ago
> Can this be implemented in rust itself, as part of the compilation ?
I'm not sure what you mean by 'in rust itself'. Do you mean as part of the rust compiler? It works fine as library. If I understand this [0] correctly, you add lalrpop to your build process and it then pre-compiles your `.lalrpop` files to rust code every time you build your project. So, it is part of the compilation even though it's not part of `rustc` itself.
[0]: https://github.com/nikomatsakis/lalrpop/blob/master/doc/tutorial.md#adding-lalrpop https://github.com/nikomatsakis/lalrpop/blob/master/doc/tuto...
- iofj 11y agoI mean can the code generation be run as part of the rust compiler ? D seems to make this sort of thing possible using a number of methods including mixins [1]. [1] http://dlang.org/mixin.html http://dlang.org/mixin.html
- killercup 11y agorustc supports 'plugins' (like compile-time regex), but the interface is not declared stable.