summary refs log tree commit diff
path: root/src/libsyntax/ext/quote.rs
AgeCommit message (Collapse)AuthorLines
2014-01-02libsyntax: De-`@mut` `quote_depth` in the parserPatrick Walton-1/+1
2014-01-02libsyntax: Make the parser mutablePatrick Walton-9/+5
2013-12-29Start passing around &mut ExtCtxtSteven Fackler-6/+6
2013-12-28Stop using @ExtCtxtSteven Fackler-19/+19
2013-12-11Make 'self lifetime illegal.Erik Price-7/+7
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-10Extend allocation lint for boxing expressionsSeo Sanghyeon-11/+11
2013-12-08Remove dead codesKiet Tran-7/+1
2013-11-28Register new snapshotsAlex Crichton-1/+1
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-5/+5
Who doesn't like a massive renaming?
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-10-08add token::LIT_STR_RAW(ident, num of # symbols)Benjamin Herr-0/+7
Treat it as a synonym for LIT_STR for now.
2013-10-01remove the `float` typeDaniel Micay-1/+0
It is simply defined as `f64` across every platform right now. A use case hasn't been presented for a `float` type defined as the highest precision floating point type implemented in hardware on the platform. Performance-wise, using the smallest precision correct for the use case greatly saves on cache space and allows for fitting more numbers into SSE/AVX registers. If there was a use case, this could be implemented as simply a type alias or a struct thanks to `#[cfg(...)]`. Closes #6592 The mailing list thread, for reference: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-09-30syntax: Remove usage of fmt!Alex Crichton-5/+5
2013-09-06quote_* macros no longer need to be capturingJohn Clements-33/+12
This is actually almost a problem, because those were my poster-child macros for "here's how to implement a capturing macro." Following this change, there will be no macros that use capturing; this will probably make life unpleasant for the first person that wants to implement a capturing macro. I should probably create a dummy_capturing macro, just to show how it works.
2013-09-06capturing macros now implementedJohn Clements-16/+43
2013-09-04stop treating char as an integer typeDaniel Micay-1/+9
Closes #7609
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-17/+17
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-5/+5
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-17/+17
2013-08-18quote_*! macros take an ExtCtxSteven Fackler-146/+82
They previously required one called "ext_cx" to be in scope. Fixes part of #7727
2013-08-12Forbid pub/priv where it has no effectAlex Crichton-3/+3
Closes #5495
2013-08-03remove obsolete `foreach` keywordDaniel Micay-1/+1
this has been replaced by `for`
2013-08-02Replace 'blk' -> 'block' in AstBuilder.OGINO Masanori-5/+5
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-01Remove the pipes compilerBrian Anderson-1/+1
The pipes compiler produced data types that encoded efficient and safe bounded message passing protocols between two endpoints. It was also capable of producing unbounded protocols. It was useful research but was arguably done before its proper time. I am removing it for the following reasons: * In practice we used it only for producing the `oneshot` and `stream` unbounded protocols and all communication in Rust use those. * The interface between the proto! macro and the standard library has a large surface area and was difficult to maintain through language and library changes. * It is now written in an old dialect of Rust and generates code which would likely be considered non-idiomatic. * Both the compiler and the runtime are difficult to understand, and likewise the relationship between the generated code and the library is hard to understand. Debugging is difficult. * The new scheduler implements `stream` and `oneshot` by hand in a way that will be significantly easier to maintain. This shouldn't be taken as an indication that 'channel protocols' for Rust are not worth pursuing again in the future.
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-1/+1
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-2/+2
`crate => Crate` `local => Local` `blk => Block` `crate_num => CrateNum` `crate_cfg => CrateConfig` Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-17libsyntax: Remove some multi-gigabyte clones that were preventing ↵Patrick Walton-1/+1
bootstrapping on Windows.
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-1/+1
2013-07-12Remove the global 'vec::to_owned' functionAlex Crichton-3/+1
2013-07-07De-share ast::TyJames Miller-5/+5
2013-06-25great renaming propagation: syntaxCorey Richardson-5/+2
2013-06-23vec: remove BaseIter implementationDaniel Micay-1/+1
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-16remove unused importsHuon Wilson-2/+0
2013-06-13Revert "std: convert {vec,str}::to_owned to methods."Brian Anderson-1/+4
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-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-58/+56
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-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-4/+2
2013-06-10std: remove str::{connect,concat}*.Huon Wilson-2/+2
2013-06-06Clean up a handful of build warnings.Michael Sullivan-2/+2
2013-06-05remove unused cx'sJohn Clements-90/+90
2013-06-05token_to_ident takes argument by referenceJohn Clements-1/+1
2013-06-05interner just uses uints, not idents with syntax contextJohn Clements-3/+3
2013-06-05just use TLS internerJohn Clements-8/+8
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+2
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+4
to libextra
2013-05-22syntax/ext: convert all AstBuilder methods to a uniform syntax.Huon Wilson-120/+106
2013-05-22syntax/ext: migrate build.rs functions to AstBuilder methods.Huon Wilson-60/+60
2013-05-22syntax/ext: modernise ext_ctxt to be CamelCase and use new.Huon Wilson-62/+62
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-3/+3
2013-05-17Re-implement lint with less emphasis on item idsAlex Crichton-5/+5
This way it's much easier to add lints throughout compilation correctly, and functions on impls can alter the way lints are emitted.