summary refs log tree commit diff
path: root/src/libsyntax/ext/build.rs
AgeCommit message (Collapse)AuthorLines
2014-01-03librustc: Remove `@mut` support from the parserPatrick Walton-5/+6
2014-01-01syntax::codemap: Add static DUMMY_SPklutzy-5/+5
It replaces `dummy_sp()`.
2013-12-29Start passing around &mut ExtCtxtSteven Fackler-3/+3
2013-12-29Make ast_fold take &mut selfSteven Fackler-2/+2
2013-12-28Stop using @ExtCtxtSteven Fackler-9/+9
2013-12-24Test fixes and rebase problemsAlex Crichton-1/+0
Note that this removes a number of run-pass tests which are exercising behavior of the old runtime. This functionality no longer exists and is thoroughly tested inside of libgreen and libnative. There isn't really the notion of "starting the runtime" any more. The major notion now is "bootstrapping the initial task".
2013-12-17Remove obsolete mutability from ast::TySeo Sanghyeon-1/+1
2013-12-01Box Block, fn_decl, variant and Ty in the AST, as they were inflating ↵Eduard Burtescu-81/+83
critical enum sizes.
2013-11-26libsyntax: Remove all non-`proc` `do` syntax.Patrick Walton-4/+4
2013-11-08Generalize AST and ty::Generics to accept multiple lifetimes.Niko Matsakis-7/+7
2013-11-04libsyntax/librustc: Allow calling variadic foreign functions.Luqman Aden-0/+1
2013-10-30Prepared `std::sys` for removal, and made `begin_unwind` simplerMarvin Löbel-3/+3
- `begin_unwind` is now generic over any `T: Any + Send`. - Every value you fail with gets boxed as an `~Any`. - Because of implementation details, `&'static str` and `~str` are still handled specially behind the scenes. - Changed the big macro source string in libsyntax to a raw string literal, and enabled doc comments there.
2013-10-28Field identifiers now include specific spans (Closes #8263).Joshua Yanovski-1/+1
2013-10-25libsyntax/librustc: Allow mut qualifier in patterns.Luqman Aden-6/+11
2013-10-09option: rewrite the API to use compositionDaniel Micay-1/+1
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-02syntax: swap from .span_fatal to .span_err in #[deriving(FromPrimitive)]Erick Tryzelaar-2/+7
2013-10-02syntax: Add #[deriving(FromPrimitive)] syntax extensionErick Tryzelaar-0/+27
Right now this only works for c-style enums.
2013-09-24Correctly encode item visibility in metadataAlex Crichton-1/+1
This fixes private statics and functions from being usable cross-crates, along with some bad privacy error messages. This is a reopening of #8365 with all the privacy checks in privacy.rs instead of resolve.rs (where they should be anyway). These maps of exported items will hopefully get used for generating documentation by rustdoc Closes #8592
2013-09-23librustc: Fix merge fallout.Patrick Walton-1/+1
2013-09-23librustc: Change fold to use traits instead of `@fn`.Patrick Walton-0/+30
2013-09-18Register new snapshotsAlex Crichton-14/+0
2013-09-10Delay assignment of node ids until after expansion. Ensures that each AST nodeNiko Matsakis-48/+24
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-03Modernized a few more types in syntax::astMarvin Löbel-182/+182
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-81/+81
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-174/+174
2013-08-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-2/+29
This removes the stacking of type parameters that occurs when invoking trait methods, and fixes all places in the standard library that were relying on it. It is somewhat awkward in places; I think we'll probably want something like the `Foo::<for T>::new()` syntax.
2013-08-27librustc: Add support for type parameters in the middle of paths.Patrick Walton-6/+19
For example, `foo::<T>::bar::<U>`. This doesn't enforce that the type parameters are in the right positions, however.
2013-08-18quote_*! macros take an ExtCtxSteven Fackler-0/+12
They previously required one called "ext_cx" to be in scope. Fixes part of #7727
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-1/+1
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-1/+1
2013-08-02Replace 'blk' -> 'block' in AstBuilder.OGINO Masanori-26/+26
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-07-29New naming convention for ast::{node_id, local_crate, crate_node_id, ↵Michael Woerister-8/+8
blk_check_mode, ty_field, ty_method}
2013-07-22De-spanned<T> and renamed ast::field (now ast::Field)Michael Woerister-7/+7
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-29/+29
`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-21/+20
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-17librustc: Remove `copy` expressions from the language.Patrick Walton-4/+0
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-3/+3
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-3/+3
2013-07-17Made ast::blk not use spanned<T> anymore.Michael Woerister-8/+8
2013-07-07De-share ast::TyJames Miller-52/+51
2013-07-07De-manage OptVec<TyParamBounds>James Miller-10/+8
2013-07-07De-share trait_refJames Miller-3/+3
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-manage LifetimeJames Miller-4/+4
2013-07-07De-managed ast::PathJames Miller-23/+23
2013-07-07Stop allocating view_items with @James Miller-11/+11
2013-06-26Infer default static/Owned bounds for unbounded heap fns/traits (#7264)Ben Blum-5/+5
2013-06-25great renaming propagation: syntaxCorey Richardson-2/+0
2013-06-23Parse and typecheck (not kindcheck) bounds on trait paths.Ben Blum-6/+10