summary refs log tree commit diff
path: root/src/libsyntax/ext/concat.rs
AgeCommit message (Collapse)AuthorLines
2013-12-29Start passing around &mut ExtCtxtSteven Fackler-1/+1
2013-12-28Stop using @ExtCtxtSteven Fackler-1/+1
2013-11-28Register new snapshotsAlex Crichton-1/+1
2013-10-31Implement a concat!() format extensionAlex Crichton-0/+58
This extension can be used to concatenate string literals at compile time. C has this useful ability when placing string literals lexically next to one another, but this needs to be handled at the syntax extension level to recursively expand macros. The major use case for this is something like: macro_rules! mylog( ($fmt:expr $($arg:tt)*) => { error2!(concat!(file!(), ":", line!(), " - ", $fmt) $($arg)*); }) Where the mylog macro will automatically prepend the filename/line number to the beginning of every log message.