about summary refs log tree commit diff
path: root/src/libsyntax/ext/log_syntax.rs
AgeCommit message (Collapse)AuthorLines
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-1/+1
[breaking-change]
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-1/+1
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-28De-@ TokenTree.Eduard Burtescu-1/+3
2014-03-22syntax: allow `trace_macros!` and `log_syntax!` in item position.Huon Wilson-11/+3
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-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-1/+2
2014-02-14Refactored ast_map and friends, mainly to have Paths without storing them.Eduard Burtescu-5/+1
2014-01-11Remove re-exports of std::io::stdio::{print, println} in the prelude.Brendan Zabarauskas-1/+1
The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-3/+3
2013-12-29Start passing around &mut ExtCtxtSteven Fackler-1/+1
2013-12-28Stop using @ExtCtxtSteven Fackler-1/+1
2013-11-27Freeze the AST by removing a couple of unused @mut ~[T] from token_tree.Eduard Burtescu-1/+1
2013-10-24Remove even more of std::ioAlex Crichton-3/+1
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-09-10Delay assignment of node ids until after expansion. Ensures that each AST nodeNiko Matsakis-1/+1
has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two representative tests. Fixes #7971 Fixes #6304 Fixes #8367 Fixes #8754 Fixes #8852 Fixes #2543 Fixes #7654
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-2/+2
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-2/+2
2013-07-17libsyntax: Remove some multi-gigabyte clones that were preventing ↵Patrick Walton-1/+1
bootstrapping on Windows.
2013-07-12Remove the global 'vec::to_owned' functionAlex Crichton-2/+1
2013-07-07De-share trait_refJames Miller-1/+1
Also, makes the pretty-printer use & instead of @ as much as possible, which will help with later changes, though in the interim has produced some... interesting constructs.
2013-06-25great renaming propagation: syntaxCorey Richardson-4/+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-1/+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-05just use TLS internerJohn Clements-1/+2
2013-06-01syntax: move callee_id into the expr_ variantsErick Tryzelaar-1/+0
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+3
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-1/+1
2013-05-10renamed vec::from_slice to vec::to_ownedYoungsoo Son-1/+1
2013-04-27only use #[no_core] in libcoreDaniel Micay-3/+0
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-1/+1
2013-03-07libsyntax: Remove struct literal expressions from the compilerPatrick Walton-1/+4
2013-03-02librustc: Stop parsing `fn@`, `fn~`, and `fn&`Patrick Walton-1/+1
2013-03-01Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-3/+3
2013-02-28Fix implicit leaks of imports throughout librariesAlex Crichton-0/+1
Also touch up use of 'pub' and move some tests around so the tested functions don't have to be 'pub'
2013-02-25libsyntax: convert visit to pass ty_params by referenceErick Tryzelaar-2/+4
2013-01-29libsyntax: De-export libsyntax. rs=deexportingPatrick Walton-2/+4
2013-01-23renaming to adhere to conventionsJohn Clements-2/+2
2013-01-20convert ast::expr into a structErick Tryzelaar-2/+6
2012-12-27librustc: Terminate name searches at the nearest module scope for paths that ↵Patrick Walton-1/+7
contain at least two components. r=graydon
2012-12-13librustc: Make `use` statements crate-relative by default. r=brsonPatrick Walton-1/+1
2012-12-03Update license, add license boilerplate to most files. Remainder will follow.Graydon Hoare-0/+10
2012-09-04libsyntax: "import" -> "use"Patrick Walton-2/+2
2012-08-26Camel case the option typeBrian Anderson-1/+1
2012-08-22intern identifiersPaul Stansifer-2/+1
2012-08-14Convert more core types to camel caseBrian Anderson-1/+1
2012-08-06Fix log_syntax of unexpanded code.Paul Stansifer-8/+7
2012-08-01Convert ret to returnBrian Anderson-1/+1
2012-07-14Move the world over to using the new style string literals and types. Closes ↵Michael Sullivan-2/+2
#2907.
2012-07-12Obliterate the callee_id hackTim Chevalier-2/+2
Exprs that could be applications of overloaded operators (expr_unary, expr_binary, expr_index) relied on the previous node ID being "reserved" to carry extra typechecking info. This was incredibly error-prone. Fixed it; now all exprs have two node IDs (which will be wasted in some cases; future work could make this an option instead if the extra int field ends up being a performance problem). Closes #2804