summary refs log tree commit diff
path: root/src/libsyntax/ext/fmt.rs
AgeCommit message (Collapse)AuthorLines
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-1/+1
2013-12-29Start passing around &mut ExtCtxtSteven Fackler-1/+1
2013-12-28Stop using @ExtCtxtSteven Fackler-1/+1
2013-10-18Remove the fmt! syntax extensionAlex Crichton-309/+8
It lived a good life, but its time has come. The groundwork is set for the official transition after the next snapshot (removal of XXX2 macros)
2013-10-08add new enum ast::StrStyle as field to ast::lit_strBenjamin Herr-1/+1
For the benefit of the pretty printer we want to keep track of how string literals in the ast were originally represented in the source code. This commit changes parser functions so they don't extract strings from the token stream without at least also returning what style of string literal it was. This is stored in the resulting ast node for string literals, obviously, for the package id in `extern mod = r"package id"` view items, for the inline asm in `asm!()` invocations. For `asm!()`'s other arguments or for `extern "Rust" fn()` items, I just the style of string, because it seemed disproportionally cumbersome to thread that information through the string processing that happens with those string literals, given the limited advantage raw string literals would provide in these positions. The other syntax extensions don't seem to store passed string literals in the ast, so they also discard the style of strings they parse.
2013-09-30syntax: Remove usage of fmt!Alex Crichton-30/+30
2013-09-23libsyntax: Introduce routines and remove all `@fn`s from libsyntax save the ↵Patrick Walton-1/+1
old visitor
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-13/+13
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-1/+1
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-12/+12
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-1/+1
cc #7887
2013-08-08env! syntax extension changesSteven Fackler-2/+2
env! aborts compilation of the specified environment variable is not defined and takes an optional second argument containing a custom error message. option_env! creates an Option<&'static str> containing the value of the environment variable. There are no run-pass tests that check the behavior when the environment variable is defined since the test framework doesn't support setting environment variables at compile time as opposed to runtime. However, both env! and option_env! are used inside of rustc itself, which should act as a sufficient test. Close #2248
2013-08-03remove obsolete `foreach` keywordDaniel Micay-4/+4
this has been replaced by `for`
2013-08-02Replace 'blk' -> 'block' in AstBuilder.OGINO Masanori-1/+1
I didn't rename variables because they are local and are not parts of the public interfaces. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-4/+4
2013-07-29Added %p directive to fmt!, which expects *T as argumentDo Nhat Minh-0/+2
2013-07-24Disallow non-comma-delimited arguments to fmt! and bytes!Birunthan Mohanathas-1/+1
Closes #4982.
2013-07-04Implement consuming iterators for ~[], remove vec::{consume, ↵Huon Wilson-2/+1
consume_reverse, map_consume}.
2013-06-25great renaming propagation: syntaxCorey Richardson-6/+4
2013-06-23vec: remove BaseIter implementationDaniel Micay-3/+3
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-22Fix compiling empty fmt! stringsAlex Crichton-0/+5
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-3/+4
This almost removes the StringRef wrapper, since all strings are Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts several things to be &'static str (the lint table and the intrinsics table). There are many instances of .to_managed(), unfortunately.
2013-06-10std: convert str::reserve* to methods, and methodise str::push_*.Huon Wilson-0/+3
2013-06-06Clean up a handful of build warnings.Michael Sullivan-5/+5
2013-06-05removed unused imports (and one unused argument)John Clements-1/+1
2013-06-05interner just uses uints, not idents with syntax contextJohn Clements-16/+14
2013-06-05just use TLS internerJohn Clements-6/+7
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-3/+11
2013-05-28Remove unnecessary allocations flagged by lintSeo Sanghyeon-6/+6
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-05-22syntax/ext: convert all AstBuilder methods to a uniform syntax.Huon Wilson-37/+27
2013-05-22syntax/ext: migrate build.rs functions to AstBuilder methods.Huon Wilson-21/+20
2013-05-22syntax/ext: modernise ext_ctxt to be CamelCase and use new.Huon Wilson-12/+12
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-1/+1
2013-05-14syntax: Remove #[allow(vecs_implicitly_copyable)]Alex Crichton-1/+1
2013-05-09Use a specialized string interner to reduce the need for owned stringsBjörn Steinbrink-31/+30
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.
2013-05-03Avoid needless creation of unique strings in fmt!()Björn Steinbrink-4/+2
Only the first portion has to be owned, as it acts as the buffer for the constructed string. The remaining strings can be static.
2013-05-02Remove 'Local Variable' commentsBrendan Zabarauskas-9/+0
2013-04-27only use #[no_core] in libcoreDaniel Micay-4/+0
2013-04-20syntax: remove unused 'mut' variablesAlex Crichton-3/+5
2013-03-22Pass the fmt! buffer to each conversion methodAlex Crichton-58/+59
Achieves a little more speedup and avoids allocations around some strings in conv_str
2013-03-22Build up the result of fmt! in a buffer instead of a vectorAlex Crichton-30/+41
2013-03-20syntax: Removing some bad copiesAlex Crichton-7/+7
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-12/+12
2013-03-11Remove uses of logBrian Anderson-11/+10
2013-03-02libsyntax: Remove `fn@`, `fn~`, and `fn&` from libsyntax. rs=defunPatrick Walton-3/+1
2013-03-02librustc: Forbid chained imports and fix the logic for one-level renaming ↵Patrick Walton-1/+2
imports
2013-03-02Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-2/+2
2013-03-01Rename core::private to core::unstable. #4743Brian Anderson-2/+2
2013-03-01Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-0/+1