Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 444 Bytes

README.md

File metadata and controls

5 lines (3 loc) · 444 Bytes

string_to_expr

Compile-time expression evaluation for strings. Inspired by trws. Check tests/tests.rs for examples.

I found this technique to be necessary to concatenate identifiers in macros. Really handy for generating structs, enums, and functions. One day, Rust will probably be able to parse macros with more flexibility. Until then, I'm using this crazy mess.