summary refs log tree commit diff
path: root/src/libsyntax/ext/tt/macro_parser.rs
AgeCommit message (Collapse)AuthorLines
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-24/+25
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-14/+15
2014-03-28Used inherited mutability in lexer::Reader.Eduard Burtescu-11/+11
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-1/+1
Closes #12771
2014-03-17De-@ ParseSess uses.Eduard Burtescu-4/+4
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-16/+25
2014-03-01libsyntax: Mechanically change `~[T]` to `Vec<T>`Patrick Walton-15/+15
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-1/+1
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-15/+14
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-07Removed @self and @Trait.Eduard Burtescu-10/+10
2014-02-02libsyntax: Remove many uses of `token::ident_to_str`Patrick Walton-6/+11
2014-01-30Remove Times traitBrendan Zabarauskas-2/+2
`Times::times` was always a second-class loop because it did not support the `break` and `continue` operations. Its playful appeal was then lost after `do` was disabled for closures. It's time to let this one go.
2014-01-21[std::vec] Rename .pop_opt() to .pop(), drop the old .pop() behaviorSimon Sapin-5/+8
2014-01-21Remove unnecessary parentheses.Huon Wilson-4/+4
2014-01-18syntax::ext: replace span_fatal with span_err in many places.Huon Wilson-2/+2
This means that compilation continues for longer, and so we can see more errors per compile. This is mildly more user-friendly because it stops users having to run rustc n times to see n macro errors: just run it once to see all of them.
2014-01-10syntax: Fix capitalization in macro_parser errorsBrian Anderson-5/+5
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-109/+88
2014-01-03libsyntax: De-`@mut` `StringReader`, `TtReader`, and `reader`Patrick Walton-7/+6
2014-01-03librustc: De-`@mut` the parse sessionPatrick Walton-9/+8
2014-01-02libsyntax: De-`@mut` `token` in the parserPatrick Walton-3/+5
2014-01-02libsyntax: De-`@mut` `quote_depth` in the parserPatrick Walton-2/+2
2014-01-02libsyntax: Make the parser mutablePatrick Walton-3/+3
2013-12-01Box Block, fn_decl, variant and Ty in the AST, as they were inflating ↵Eduard Burtescu-2/+2
critical enum sizes.
2013-11-28Register new snapshotsAlex Crichton-2/+2
2013-11-26libsyntax: Remove all non-`proc` `do` syntax.Patrick Walton-5/+5
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-3/+3
Who doesn't like a massive renaming?
2013-09-30syntax: Remove usage of fmt!Alex Crichton-6/+6
2013-09-06uncomment mtwt_resolve callsJohn Clements-2/+2
2013-09-06fix one remaining token comparison, refactor token comparison to avoid == checkJohn Clements-11/+10
2013-09-06compare macro tokens hygienically (commented out)John Clements-1/+15
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-5/+5
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-6/+6
2013-08-27librustc: Add support for type parameters in the middle of paths.Patrick Walton-2/+4
For example, `foo::<T>::bar::<U>`. This doesn't enforce that the type parameters are in the right positions, however.
2013-08-11auto merge of #8455 : nikomatsakis/rust/issue-5762-objects-dralston-d, r=graydonbors-2/+2
Fix #5762 and various other aspects of object invocation. r? @graydon
2013-08-11libsyntax: Update from `@Object` to `@mut Object` as requiredNiko Matsakis-2/+2
2013-08-11syntax: Shrink enum Token and enum nonterminalblake2-ppc-4/+4
`enum Token` was 192 bytes (64-bit), as pointed out by pnkfelix; the only bloating variant being `INTERPOLATED(nonterminal)`. Updating `enum nonterminal` to use ~ where variants included big types, shrunk size_of(Token) to 32 bytes (64-bit). I am unsure if the `nt_ident` variant should have an indirection, with ast::ident being only 16 bytes (64-bit), but without this, enum Token would be 40 bytes. A dumb benchmark says that compilation time is unchanged, while peak memory usage for compiling std.rs is down 3% Before:: $ time ./x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1 src/libstd/std.rs 19.00user 0.39system 0:19.41elapsed 99%CPU (0avgtext+0avgdata 627820maxresident)k 0inputs+28896outputs (0major+228665minor)pagefaults 0swaps $ time ./x86_64-unknown-linux-gnu/stage1/bin/rustc -O --cfg stage1 src/libstd/std.rs 31.64user 0.34system 0:32.02elapsed 99%CPU (0avgtext+0avgdata 629876maxresident)k 0inputs+22432outputs (0major+229411minor)pagefaults 0swaps After:: $ time ./x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1 src/libstd/std.rs 19.07user 0.45system 0:19.55elapsed 99%CPU (0avgtext+0avgdata 609384maxresident)k 0inputs+28896outputs (0major+221997minor)pagefaults 0swaps $ time ./x86_64-unknown-linux-gnu/stage1/bin/rustc -O --cfg stage1 src/libstd/std.rs 31.90user 0.34system 0:32.28elapsed 99%CPU (0avgtext+0avgdata 612080maxresident)k 0inputs+22432outputs (0major+223726minor)pagefaults 0swaps
2013-08-08Allow attributes to appear as macro argumentsNiko Matsakis-0/+2
Fixes #8393
2013-08-03remove obsolete `foreach` keywordDaniel Micay-6/+6
this has been replaced by `for`
2013-08-02replace `range` with an external iteratorDaniel Micay-3/+2
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-1/+1
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-4/+4
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-17librustc: Remove all uses of "copy".Patrick Walton-11/+13
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-2/+1
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-25great renaming propagation: syntaxCorey Richardson-5/+3