summary refs log tree commit diff
path: root/src/libsyntax/ext/concat.rs
AgeCommit message (Collapse)AuthorLines
2014-03-02Expand string literals and exprs inside of macrosSteven Fackler-1/+0
A couple of syntax extensions manually expanded expressions, but it wasn't done universally, most noticably inside of asm!(). There's also a bit of random cleanup.
2014-02-18Avoid returning original macro if expansion fails.Douglas Young-1/+1
Closes #11692. Instead of returning the original expression, a dummy expression (with identical span) is returned. This prevents infinite loops of failed expansions as well as odd double error messages in certain situations.
2014-02-02libsyntax: Make float literals not use `@str`Patrick Walton-4/+3
2014-02-02libsyntax: De-`@str` literal strings in the ASTPatrick Walton-3/+6
2014-01-18syntax::ext: replace span_fatal with span_err in many places.Huon Wilson-1/+4
This means that compilation continues for longer, and so we can see more errors per compile. This is mildly more user-friendly because it stops users having to run rustc n times to see n macro errors: just run it once to see all of them.
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-11/+9
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.