Skip to content

Instantly share code, notes, and snippets.

@dginev
Created March 17, 2016 23:29
Show Gist options
  • Save dginev/2a93ba5f28967c0ca20f to your computer and use it in GitHub Desktop.
Save dginev/2a93ba5f28967c0ca20f to your computer and use it in GitHub Desktop.
Mocks for DefConsturctors
// Old style:
DefConstructor!("\emph{}", "<ltx:emph>#1</ltx:emph>");
// New style:
DefConstructor!("\emph{}", element!("ltx:emph", arg!(1)));
@Geal
Copy link

Geal commented Mar 18, 2016

that looks doable, but if you need to compile the closure at compile time, you want to look at syntax plugins for rustc, this may be interesting

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