about summary refs log tree commit diff
path: root/src/libsyntax/ext/trace_macros.rs
AgeCommit message (Collapse)AuthorLines
2015-12-15Move built-in syntax extensions to a separate crateSeo Sanghyeon-43/+0
2015-11-06remove `Tt` prefix from TokenType variantsOliver Schneider-4/+4
[breaking change]
2015-09-08Allow tracking issues for lang features.Huon Wilson-0/+1
This is similar to the libs version, which allow an `issue` field in the `#[unstable]` attribute. cc #28244
2015-04-21syntax: Remove uses of #[feature(slice_patterns)]Erick Tryzelaar-4/+3
2015-02-16Address the other cases of #22234; fix #22234.Felix S. Klock II-0/+10
The other cases: `concat_idents!`, `log_syntax!`, and `trace_macros!`, (these macros, with `asm!`, are handled (eagerly) in feature_gate.rs).
2014-10-28Convert some token functions into methodsBrendan Zabarauskas-3/+3
2014-10-26Use standard capitalisation for TokenTree variantsBrendan Zabarauskas-2/+2
2014-10-26Rename TokenTree variants for clarityBrendan Zabarauskas-2/+2
This should be clearer, and fits in better with the `TTNonterminal` variant. Renames: - `TTTok` -> `TTToken` - `TTDelim` -> `TTDelimited` - `TTSeq` -> `TTSequence`
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-1/+1
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-1/+2
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-04-16syntax: unify all MacResult's into a single trait.Huon Wilson-2/+2
There's now one unified way to return things from a macro, instead of being able to choose the `AnyMacro` trait or the `MRItem`/`MRExpr` variants of the `MacResult` enum. This does simplify the logic handling the expansions, but the biggest value of this is it makes macros in (for example) type position easier to implement, as there's this single thing to modify. By my measurements (using `-Z time-passes` on libstd and librustc etc.), this appears to have little-to-no impact on expansion speed. There are presumably larger costs than the small number of extra allocations and virtual calls this adds (notably, all `macro_rules!`-defined macros have not changed in behaviour, since they had to use the `AnyMacro` trait anyway).
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