about summary refs log tree commit diff
path: root/src/libsyntax/ext/quote.rs
AgeCommit message (Collapse)AuthorLines
2014-05-27std: Rename strbuf operations to stringRicho Healey-12/+12
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-13/+13
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-35/+35
[breaking-change]
2014-05-23auto merge of #14360 : alexcrichton/rust/remove-deprecated, r=kballardbors-1/+0
These have all been deprecated for awhile now, so it's likely time to start removing them.
2014-05-23syntax: Clean out obsolete syntax parsingAlex Crichton-1/+0
All of these features have been obsolete since February 2014, where most have been obsolete since 2013. There shouldn't be any more need to keep around the parser hacks after this length of time.
2014-05-22libstd: Remove all uses of `~str` from `libstd`Patrick Walton-3/+3
2014-05-08libsyntax: Remove uses of `~str` from libsyntax, and fix falloutPatrick Walton-47/+55
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-6/+12
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-05-02syntax: implement ToSource for more things in the quasiquoter.Huon Wilson-0/+23
The last few primitive types were missing.
2014-04-22add support for quadruple precision floating pointDaniel Micay-1/+2
This currently requires linking against a library like libquadmath (or libgcc), because compiler-rt barely has any support for this and most hardware does not yet have 128-bit precision floating point. For this reason, it's currently hidden behind a feature gate. When compiler-rt is updated to trunk, some tests can be added for constant evaluation since there will be support for the comparison operators. Closes #13381
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-16/+16
2014-04-16syntax: unify all MacResult's into a single trait.Huon Wilson-12/+12
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-30Removed deprecated functions `map` and `flat_map` for vectors and slices.Marvin Löbel-3/+3
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-4/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-2/+2
Closes #12771
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-8/+14
2014-03-01libsyntax: Mechanically change `~[T]` to `Vec<T>`Patrick Walton-52/+52
2014-02-14Refactored ast_map and friends, mainly to have Paths without storing them.Eduard Burtescu-8/+7
2014-02-08Fixed error starting with uppercasemr.Shu-2/+2
Error messages cleaned in librustc/middle Error messages cleaned in libsyntax Error messages cleaned in libsyntax more agressively Error messages cleaned in librustc more aggressively Fixed affected tests Fixed other failing tests Last failing tests fixed
2014-02-02libsyntax: De-`@str` pathnamesPatrick Walton-17/+14
2014-02-02librustc: Stop using `@str` for source.Patrick Walton-11/+11
2014-02-02libsyntax: De-`@str` `to_source`Patrick Walton-41/+42
2014-02-02libsyntax: De-`@str` literal strings in the ASTPatrick Walton-2/+4
2014-01-23Redo exported macro serializationSteven Fackler-1/+0
The old method of serializing the AST gives totally bogus spans if the expansion of an imported macro causes compilation errors. The best solution seems to be to serialize the actual textual macro definition and load it the same way the std-macros are. I'm not totally confident that getting the source from the CodeMap will always do the right thing, but it seems to work in simple cases.
2014-01-20auto merge of #11660 : sfackler/rust/quote-unused-sp, r=huonwbors-2/+2
The provided span isn't used in all cases (namely primitives).
2014-01-18Avoid unused variable warning in quote_*!Steven Fackler-2/+2
The provided span isn't used in all cases (namely primitives).
2014-01-18auto merge of #11607 : alexcrichton/rust/issue-9957, r=cmrbors-1/+1
For `use` statements, this means disallowing qualifiers when in functions and disallowing `priv` outside of functions. For `extern mod` statements, this means disallowing everything everywhere. It may have been envisioned for `pub extern mod foo` to be a thing, but it currently doesn't do anything (resolve doesn't pick it up), so better to err on the side of forwards-compatibility and forbid it entirely for now. Closes #9957
2014-01-18Forbid unnecessary visibility on view itemsAlex Crichton-1/+1
For `use` statements, this means disallowing qualifiers when in functions and disallowing `priv` outside of functions. For `extern mod` statements, this means disallowing everything everywhere. It may have been envisioned for `pub extern mod foo` to be a thing, but it currently doesn't do anything (resolve doesn't pick it up), so better to err on the side of forwards-compatibility and forbid it entirely for now. Closes #9957
2014-01-16Load macros from external modulesSteven Fackler-1/+1
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-67/+63
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