summary refs log tree commit diff
path: root/src/libsyntax/fold.rs
AgeCommit message (Collapse)AuthorLines
2013-09-23test: Fix rustdoc and tests.Patrick Walton-13/+2
2013-09-23libsyntax: Introduce routines and remove all `@fn`s from libsyntax save the ↵Patrick Walton-26/+10
old visitor
2013-09-23librustc: Change fold to use traits instead of `@fn`.Patrick Walton-805/+635
2013-09-13Work around a compiler crash folding labeled break. #9129Brian Anderson-2/+10
Servo is hitting this problem, so this is a workaround for a lack of a real solution.
2013-09-10change type of ExprLoop and ExprBreak elts from ident->name.John Clements-2/+5
Lots of downstream changes in librustc, should be infinitesimally faster.
2013-09-10Delay assignment of node ids until after expansion. Ensures that each AST nodeNiko Matsakis-149/+213
has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two representative tests. Fixes #7971 Fixes #6304 Fixes #8367 Fixes #8754 Fixes #8852 Fixes #2543 Fixes #7654
2013-09-09auto merge of #9005 : alexcrichton/rust/rusty-log, r=brsonbors-6/+1
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-08syntax: implement labelled breaks for `for`.Huon Wilson-3/+4
`for` desugars to `loop` so it is trivial to just desugar to `loop` while retaining any label.
2013-09-06comment fixJohn Clements-1/+1
2013-09-06capturing macros now implementedJohn Clements-0/+1
2013-09-06add fold_mac field to fold.rsJohn Clements-24/+38
2013-09-06rework fold so that fold_tts takes an ast_fold rather than a thunk, stop ↵John Clements-6/+8
using closures in ident traversal
2013-09-06add temporarily unused ctxt field to mac_invoc_ttJohn Clements-2/+3
2013-09-06fixed bug in fold's traversal of cast exprsJohn Clements-1/+1
2013-09-06new test that uncovers bug in foldJohn Clements-0/+11
2013-09-06remove FIXME #2888, now bug is fixedJohn Clements-3/+2
2013-09-06adding test case to check marking/unmarkingJohn Clements-2/+2
2013-09-06refactor so tt_fold only requires an ident->ident fnJohn Clements-9/+11
2013-09-05Remove the __log function for __log_levelAlex Crichton-6/+1
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-114/+114
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-6/+6
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-22/+22
2013-08-28auto merge of #8718 : bblum/rust/typeof, r=pcwaltonbors-0/+1
r? anybody
2013-08-27librustc: Add support for type parameters in the middle of paths.Patrick Walton-3/+5
For example, `foo::<T>::bar::<U>`. This doesn't enforce that the type parameters are in the right positions, however.
2013-08-23Parse and reserve typeof keyword. #3228Ben Blum-0/+1
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-5/+5
cc #5898
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-1/+1
cc #7887
2013-08-07core: option.map_consume -> option.map_moveErick Tryzelaar-11/+11
2013-08-04rm obsolete `for` support from the compilerDaniel Micay-1/+0
2013-08-03remove obsolete `foreach` keywordDaniel Micay-1/+1
this has been replaced by `for`
2013-08-02librustc: Disallow "unsafe" for external functionsPatrick Walton-2/+1
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-1/+1
2013-08-01make `in` and `foreach` get treated as keywordsDaniel Micay-1/+1
2013-07-30syntax: implement foreach .. in .. { .. } via desugaring.Graydon Hoare-0/+5
2013-07-29New naming convention for ast::{node_id, local_crate, crate_node_id, ↵Michael Woerister-10/+8
blk_check_mode, ty_field, ty_method}
2013-07-22De-spanned<T> and renamed ast::field (now ast::Field)Michael Woerister-6/+4
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-23/+23
`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-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-14/+13
This does a number of things, but especially dramatically reduce the number of allocations performed for operations involving attributes/ meta items: - Converts ast::meta_item & ast::attribute and other associated enums to CamelCase. - Converts several standalone functions in syntax::attr into methods, defined on two traits AttrMetaMethods & AttributeMethods. The former is common to both MetaItem and Attribute since the latter is a thin wrapper around the former. - Deletes functions that are unnecessary due to iterators. - Converts other standalone functions to use iterators and the generic AttrMetaMethods rather than allocating a lot of new vectors (e.g. the old code would have to allocate a new vector to use functions that operated on &[meta_item] on &[attribute].) - Moves the core algorithm of the #[cfg] matching to syntax::attr, similar to find_inline_attr and find_linkage_metas. This doesn't have much of an effect on the speed of #[cfg] stripping, despite hugely reducing the number of allocations performed; presumably most of the time is spent in the ast folder rather than doing attribute checks. Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-17libsyntax: Remove some multi-gigabyte clones that were preventing ↵Patrick Walton-2/+2
bootstrapping on Windows.
2013-07-17librustc: Remove `copy` expressions from the language.Patrick Walton-1/+0
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-18/+21
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-11/+15
2013-07-17Made ast::blk not use spanned<T> anymore.Michael Woerister-6/+6
2013-07-07Fix broken testsJames Miller-3/+3
2013-07-07De-share ast::TyJames Miller-24/+24
2013-07-07De-manage OptVec<TyParamBounds>James Miller-4/+5
2013-07-07De-share trait_refJames Miller-6/+6
Also, makes the pretty-printer use & instead of @ as much as possible, which will help with later changes, though in the interim has produced some... interesting constructs.
2013-07-07De-managed ast::PathJames Miller-13/+13
2013-07-07Stop allocating view_items with @James Miller-7/+6
2013-07-04Remove vec::{filter, filtered, filter_map, filter_mapped}, replaced by ↵Huon Wilson-3/+1
iterators.