summary refs log tree commit diff
path: root/src/libsyntax/ext/trace_macros.rs
AgeCommit message (Collapse)AuthorLines
2014-03-22syntax: allow `trace_macros!` and `log_syntax!` in item position.Huon Wilson-22/+10
Previously trace_macros!(true) fn main() {} would complain about `trace_macros` being an expression macro in item position. This is a pointless limitation, because the macro is purely compile-time, with no runtime effect. (And similarly for log_syntax.) This also changes the behaviour of `trace_macros!` very slightly, it used to be equivalent to macro_rules! trace_macros { (true $($_x: tt)*) => { true }; (false $($_x: tt)*) => { false } } I.e. you could invoke it with arbitrary trailing arguments, which were ignored. It is changed to accept only exactly `true` or `false` (with no trailing arguments) and expands to `()`.
2014-03-17De-@ codemap and diagnostic.Eduard Burtescu-1/+1
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-1/+1
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-07Removed @self and @Trait.Eduard Burtescu-3/+2
2014-01-18syntax::ext: replace span_fatal with span_err in many places.Huon Wilson-1/+2
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-3/+3
2014-01-03libsyntax: De-`@mut` `StringReader`, `TtReader`, and `reader`Patrick Walton-1/+1
2014-01-02libsyntax: Make the parser mutablePatrick Walton-2/+2
2013-12-29Start passing around &mut ExtCtxtSteven Fackler-1/+1
2013-12-28Stop using @ExtCtxtSteven Fackler-1/+1
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-2/+2
2013-08-11libsyntax: Update from `@Object` to `@mut Object` as requiredNiko Matsakis-1/+1
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-5/+1
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-5/+3
2013-07-12Remove the global 'vec::to_owned' functionAlex Crichton-3/+1
2013-06-25great renaming propagation: syntaxCorey Richardson-3/+2
2013-06-13Revert "std: convert {vec,str}::to_owned to methods."Brian Anderson-1/+2
This fixes the strange random crashes in compile-fail tests. This reverts commit 96cd61ad034cc9e88ab6a7845c3480dbc1ea62f3. Conflicts: src/librustc/driver/driver.rs src/libstd/str.rs src/libsyntax/ext/quote.rs
2013-06-12std: unify the str -> [u8] functions as 3 methods: .as_bytes() and ↵Huon Wilson-2/+0
.as_bytes_with_null[_consume](). The first acts on &str and is not nul-terminated, the last two act on strings that are always null terminated (&'static str, ~str and @str).
2013-06-12std: convert {vec,str}::to_owned to methods.Huon Wilson-1/+1
2013-06-05removed unused imports (and one unused argument)John Clements-1/+0
2013-06-05remove interner from tt_readerJohn Clements-1/+0
2013-06-05just use TLS internerJohn Clements-1/+2
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+2
2013-05-25Use an enum for keywords and intern them to improve parser performanceBjörn Steinbrink-2/+3
Currently, keywords are stored in hashsets that are recreated for every Parser instance, which is quite expensive since macro expansion creates lots of them. Additionally, the parser functions that look for a keyword currently accept a string and have a runtime check to validate that they actually received a keyword. By creating an enum for the keywords and inserting them into the ident interner, we can avoid the creation of the hashsets and get static checks for the keywords. For libstd, this cuts the parse+expansion part from ~2.6s to ~1.6s.
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-05-22syntax/ext: modernise ext_ctxt to be CamelCase and use new.Huon Wilson-2/+2
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-1/+1
2013-05-15Allow static strings to be used with keyword checksBjörn Steinbrink-2/+2
2013-05-10renamed vec::from_slice to vec::to_ownedYoungsoo Son-1/+1
2013-04-27only use #[no_core] in libcoreDaniel Micay-2/+0
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-3/+5
2013-03-04Adding missing imports for tests, and gate off othersAlex Crichton-1/+0
2013-03-02librustc: Stop parsing `fn@`, `fn~`, and `fn&`Patrick Walton-1/+1
2013-02-26libsyntax: add some more explicit copiesErick Tryzelaar-1/+5
2013-02-25libsyntax: is_keyword should take a &~strErick Tryzelaar-2/+2
2013-02-25libsyntax: convert visit to pass ty_params by referenceErick Tryzelaar-5/+9
2013-02-21Get rid of structural records in libsyntax and the last bit in librustc.Luqman Aden-1/+1
2013-01-29libsyntax: De-export libsyntax. rs=deexportingPatrick Walton-2/+2
2013-01-23renaming to adhere to conventionsJohn Clements-2/+2
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-4/+5
module scope. r=tjc
2013-01-08Revert "librustc: Make unqualified identifier searches terminate at the ↵Patrick Walton-5/+4
nearest module scope. r=tjc" This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6.
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-4/+5
module scope. r=tjc
2012-12-27librustc: Terminate name searches at the nearest module scope for paths that ↵Patrick Walton-0/+2
contain at least two components. r=graydon
2012-12-03Update license, add license boilerplate to most files. Remainder will follow.Graydon Hoare-0/+10
2012-11-29impls of traits cannot define methods on the anonymous traitBrian Anderson-1/+0
2012-11-29Fix trace_macros so that it works.Paul Stansifer-5/+9
2012-11-18Remove unused file_type enum from the parserBrian Anderson-3/+3
2012-10-15rustc: Merge module and type namespaces. r=brsonPatrick Walton-3/+3
2012-09-04libsyntax: "import" -> "use"Patrick Walton-6/+6