about summary refs log tree commit diff
path: root/src/libsyntax/ext/tt
AgeCommit message (Collapse)AuthorLines
2014-10-24Add a lint for not using field pattern shorthandsP1start-1/+1
Closes #17792.
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-8/+8
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-07Fix the most egregious instances of "local ambiguity: multiple parsing ↵Vadim Chugunov-1/+10
options..." error in macros, which often occurs when trying to match parts of Rust syntax. For example, this matcher: `fn $name:ident( $($param:ident : $pty:ty),* )` would fail when parsing `fn foo()`, because macro parser wouldn't realize that an ident cannot start with `)`. This resolves #5902, and at least partially mitigates #9364 and #3232.
2014-09-17librustc: Implement associated types behind a feature gate.Patrick Walton-1/+4
The implementation essentially desugars during type collection and AST type conversion time into the parameter scheme we have now. Only fully qualified names--e.g. `<T as Foo>::Bar`--are supported.
2014-09-16Fallout from renamingAaron Turon-7/+7
2014-09-14syntax: fix fallout from using ptr::P.Eduard Burtescu-17/+17
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-20/+19
2014-07-21Add a ton of ignore-lexer-testCorey Richardson-0/+2
2014-07-13add make_method method to MacResult traitJohn Clements-1/+18
this allows macro results to be parsed as methods
2014-07-11rename one of the two confusing MacroExpandersJohn Clements-2/+2
There were two things named MacroExpander, which was confusing. I renamed one of them TTMacroExpander. [breaking change]
2014-07-09syntax: doc comments all the thingsCorey Richardson-99/+96
2014-07-08macro literals should be compared by name onlyJohn Clements-2/+1
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-5/+5
[breaking-change]
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-0/+1
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-13syntax: parse outer attributes in `quote_item!` calls.Huon Wilson-2/+1
Fixes #14857.
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-2/+4
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11syntax: Move the AST from @T to Gc<T>Alex Crichton-5/+6
2014-06-10Fix more misspelled comments and strings.Joseph Crail-1/+1
2014-06-06auto merge of #14667 : aochagavia/rust/pr2, r=huonwbors-1/+1
2014-06-06Change to_str().to_string() to just to_str()Adolfo Ochagavía-1/+1
2014-06-05Fallout from the libcollections movementAlex Crichton-2/+2
2014-05-30libsyntax: Fix snake_case errors.Kevin Butler-3/+3
A number of functions/methods have been moved or renamed to align better with rust standard conventions. syntax::ext::mtwt::xorPush => xor_push syntax::parse::parser::Parser => Parser::new [breaking-change]
2014-05-28Add patterns to MacResultKeegan McAllister-0/+5
2014-05-27std: Rename strbuf operations to stringRicho Healey-8/+8
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-4/+4
[breaking-change]
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-1/+3
[breaking-change]
2014-05-22libstd: Remove all uses of `~str` from `libstd`Patrick Walton-1/+4
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-5/+6
2014-05-08libsyntax: Remove uses of `~str` from libsyntax, and fix falloutPatrick Walton-19/+24
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-8/+8
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-02Replace most ~exprs with 'box'. #11779Brian Anderson-9/+9
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-5/+5
2014-04-16syntax: unify all MacResult's into a single trait.Huon Wilson-17/+28
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-31syntax: Switch field privacy as necessaryAlex Crichton-7/+7
2014-03-30Removed deprecated functions `map` and `flat_map` for vectors and slices.Marvin Löbel-2/+2
2014-03-28auto merge of #13170 : eddyb/rust/syntax-cleanup, r=alexcrichtonbors-211/+182
Removes all Cell's/RefCell's from lexer::Reader implementations and a couple @.
2014-03-28syntax: Accept meta matchers in macrosAlex Crichton-1/+1
This removes the `attr` matcher and adds a `meta` matcher. The previous `attr` matcher is now ambiguous because it doesn't disambiguate whether it means inner attribute or outer attribute. The new behavior can still be achieved by taking an argument of the form `#[$foo:meta]` (the brackets are part of the macro pattern). Closes #13067
2014-03-28De-@ NamedMatch.Eduard Burtescu-26/+27
2014-03-28De-@ TokenTree.Eduard Burtescu-6/+8
2014-03-28Used inherited mutability in lexer::Reader.Eduard Burtescu-184/+152
2014-03-22syntax: Fix fallout of removing get()Alex Crichton-54/+31
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-3/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-3/+3
Closes #12771
2014-03-17De-@ codemap and diagnostic.Eduard Burtescu-13/+12
2014-03-17De-@ ParseSess uses.Eduard Burtescu-8/+8
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-25/+52
2014-03-01libsyntax: Mechanically change `~[T]` to `Vec<T>`Patrick Walton-29/+28
2014-02-23Make break and continue hygienicEdward Wang-2/+3
Makes labelled loops hygiene by performing renaming of the labels defined in e.g. `'x: loop { ... }` and then used in break and continue statements within loop body so that they act hygienically when used with macros. Closes #12262.
2014-02-23Move std::{trie, hashmap} to libcollectionsAlex Crichton-2/+2
These two containers are indeed collections, so their place is in libcollections, not in libstd. There will always be a hash map as part of the standard distribution of Rust, but by moving it out of the standard library it makes libstd that much more portable to more platforms and environments. This conveniently also removes the stuttering of 'std::hashmap::HashMap', although 'collections::HashMap' is only one character shorter.
2014-02-14Refactored ast_map and friends, mainly to have Paths without storing them.Eduard Burtescu-33/+27