summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2013-07-30syntax: implement foreach .. in .. { .. } via desugaring.Graydon Hoare-1/+19
2013-07-30syntax: add temporary 'foreach' keyword.Graydon Hoare-0/+3
2013-07-30syntax: add 'in' keywordGraydon Hoare-0/+3
2013-07-29New naming convention for ast::{node_id, local_crate, crate_node_id, ↵Michael Woerister-32/+30
blk_check_mode, ty_field, ty_method}
2013-07-27auto merge of #8060 : Blei/rust/fix-obsolete-extern-visibility-span, r=pcwaltonbors-1/+1
2013-07-26syntax: fix span for obsolete extern visibility errorPhilipp Brüschweiler-1/+1
2013-07-25syntax: Fix #6416 by aborting on errors after test parse.Graydon Hoare-4/+2
2013-07-24Change 'print(fmt!(...))' to printf!/printfln! in src/lib*Birunthan Mohanathas-2/+2
2013-07-22auto merge of #7873 : sstewartgallus/rust/cleanup_syntax, r=alexcrichtonbors-100/+100
2013-07-22De-spanned<T> and renamed ast::field (now ast::Field)Michael Woerister-5/+6
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-49/+49
`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-22auto merge of #7926 : brson/rust/issue-4116, r=graydonbors-12/+25
When loading a module the parser will look for either foo.rs or foo/mod.rs and generate an error when both are found.
2013-07-22new snapshotDaniel Micay-3/+0
2013-07-21Cleanup libsyntax a bitSteven Stewart-Gallus-100/+100
2013-07-21syntax: Bless mod.rs. #4116Brian Anderson-12/+25
When loading a module the parser will look for either foo.rs or foo/mod.rs and generate an error when both are found.
2013-07-20auto merge of #7902 : huonw/rust/attr++, r=cmr,pcwaltonbors-79/+70
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 spans, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-5/+18
Place `pub` or `priv` on individual items instead.
2013-07-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-79/+70
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-18Silence various warnings in bootstrap build.Felix S. Klock II-5/+1
2013-07-17libsyntax: Remove some multi-gigabyte clones that were preventing ↵Patrick Walton-16/+15
bootstrapping on Windows.
2013-07-17librustc: Change repeated vector expressions to use implicit copyability.Patrick Walton-3/+11
2013-07-17librustc: Remove all uses of the `Copy` bound.Patrick Walton-30/+30
2013-07-17librustc: Remove `copy` expressions from the language.Patrick Walton-18/+2
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-389/+523
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-55/+41
2013-07-17Made ast::blk not use spanned<T> anymore.Michael Woerister-37/+32
2013-07-14Make TLS keys actually take up spaceAlex Crichton-1/+2
If the TLS key is 0-sized, then the linux linker is apparently smart enough to put everything at the same pointer. OSX on the other hand, will reserve some space for all of them. To get around this, the TLS key now actuall consumes space to ensure that it gets a unique pointer
2013-07-14Purge the last remnants of the old TLS apiAlex Crichton-13/+10
Closes #3273
2013-07-11auto merge of #7677 : alexcrichton/rust/tls-gc, r=pcwaltonbors-2/+2
cc #6004 and #3273 This is a rewrite of TLS to get towards not requiring `@` when using task local storage. Most of the rewrite is straightforward, although there are two caveats: 1. Changing `local_set` to not require `@` is blocked on #7673 2. The code in `local_pop` is some of the most unsafe code I've written. A second set of eyes should definitely scrutinize it... The public-facing interface currently hasn't changed, although it will have to change because `local_data::get` cannot return `Option<T>`, nor can it return `Option<&T>` (the lifetime isn't known). This will have to be changed to be given a closure which yield `&T` (or as an Option). I didn't do this part of the api rewrite in this pull request as I figured that it could wait until when `@` is fully removed. This also doesn't deal with the issue of using something other than functions as keys, but I'm looking into using static slices (as mentioned in the issues).
2013-07-11Remove all external requirements of `@` from TLSAlex Crichton-1/+1
Closes #6004
2013-07-10unnecessarily mutable variablesBrendan Cully-1/+1
2013-07-09Rename local_data methods/types for less keystrokesAlex Crichton-2/+2
2013-07-09Don't use static default methodJohn Barker-1/+0
- also removed redundant assignment to is_mutbl - updated copyright
2013-07-09Always eat up mut when parsing general args, fixes #7483John Barker-2/+2
2013-07-08Correct merge errorsNiko Matsakis-1/+1
2013-07-07remove some method resolve workaroundsDaniel Micay-1/+1
2013-07-07auto merge of #7615 : Aatch/rust/syntax-deshare, r=graydonbors-83/+91
In an ideal world, the AST would be completely sendable, this gets us a step closer. It removes the local heap allocations for `view_item`, `Path`, `Lifetime` `trait_ref` `OptVec<TyParamBounds>` and `Ty`. There are also a few other smaller changes I made as things went along.
2013-07-07Fix broken testsJames Miller-5/+5
2013-07-07De-share ast::TyJames Miller-18/+18
2013-07-07De-manage OptVec<TyParamBounds>James Miller-3/+3
2013-07-07De-share trait_refJames Miller-4/+4
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-10/+10
2013-07-07De-managed ast::PathJames Miller-37/+45
2013-07-07Stop allocating view_items with @James Miller-7/+7
2013-07-07auto merge of #7585 : Blei/rust/fix-circular-modules, r=huonwbors-2/+23
Fixes #7276
2013-07-05Change spans for sugary call expressionsSeo Sanghyeon-9/+8
2013-07-04libsyntax: fix infinite loop when recursively including modulesPhilipp Brüschweiler-2/+23
Fixes #7276
2013-06-30Change char::escape_{default,unicode} to take callbacks instead of allocatingAlex Crichton-2/+6
strings
2013-06-30auto merge of #7468 : cmr/rust/great_renaming, r=pcwaltonbors-8/+0
2013-06-29Remove mutability from unique boxes in the ASTAlex Crichton-4/+8