about summary refs log tree commit diff
path: root/src/libsyntax/parse/attr.rs
AgeCommit message (Collapse)AuthorLines
2013-08-17Fix warnings in librustc and libsyntaxErick Tryzelaar-1/+0
2013-08-08Allow attributes to appear as macro argumentsNiko Matsakis-57/+74
Fixes #8393
2013-07-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-28/+28
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 all uses of "copy".Patrick Walton-8/+6
2013-06-28librustc: Remove the broken overloaded assign-ops from the language.Patrick Walton-9/+7
They evaluated the receiver twice. They should be added back with `AddAssign`, `SubAssign`, etc., traits.
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-2/+2
This almost removes the StringRef wrapper, since all strings are Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts several things to be &'static str (the lint table and the intrinsics table). There are many instances of .to_managed(), unfortunately.
2013-05-28Remove unnecessary allocations flagged by lintSeo Sanghyeon-6/+6
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-1/+1
2013-05-03More accurate spansSeo Sanghyeon-1/+1
2013-05-02Remove 'Local Variable' commentsBrendan Zabarauskas-10/+0
2013-04-28parser commentsJohn Clements-0/+7
parser comments
2013-04-20syntax: remove unused 'mut' variablesAlex Crichton-4/+4
2013-03-04Remove unused imports throughout src/Alex Crichton-4/+0
2013-03-03libsyntax: add &self to parser methodsErick Tryzelaar-15/+18
2013-03-01Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-0/+1
2013-02-28Fix implicit leaks of imports throughout librariesAlex Crichton-0/+1
Also touch up use of 'pub' and move some tests around so the tested functions don't have to be 'pub'
2013-02-26libsyntax: add explicit copiesErick Tryzelaar-3/+9
2013-02-26libsyntax: more minor cleanupErick Tryzelaar-2/+2
2013-02-26libsyntax: change attr::parse_seq_* to take &TokenErick Tryzelaar-2/+2
2013-02-25libsyntax: minor cleanupErick Tryzelaar-3/+6
2013-02-25libsyntax: change expect to take &token::TokenErick Tryzelaar-3/+3
2013-02-25libsyntax: Convert ast::attribute_ to store a @meta_itemErick Tryzelaar-1/+1
2013-02-22libsyntax: De-mut the parser. rs=demutingPatrick Walton-5/+5
2013-02-21Cleanup, commenting, trivial renamingJohn Clements-0/+4
2013-02-21Get rid of structural records in libsyntax and the last bit in librustc.Luqman Aden-3/+3
2013-02-19convert ast::meta_items to take @~strsErick Tryzelaar-16/+16
2013-02-14librustc: Replace `impl Type : Trait` with `impl Trait for Type`. ↵Patrick Walton-1/+1
rs=implflipping
2013-01-31test cases, cleanupJohn Clements-1/+1
2013-01-29libsyntax: De-export a lot of libsyntax. rs=deëxportingPatrick Walton-3/+1
2013-01-14convert ast::attribute_ and ast::view_item to a structErick Tryzelaar-4/+6
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-0/+3
module scope. r=tjc
2013-01-08Revert "librustc: Make unqualified identifier searches terminate at the ↵Patrick Walton-3/+0
nearest module scope. r=tjc" This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6.
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-0/+3
module scope. r=tjc
2012-12-27librustc: Terminate name searches at the nearest module scope for paths that ↵Patrick Walton-1/+4
contain at least two components. r=graydon
2012-12-13librustc: Make `use` statements crate-relative by default. r=brsonPatrick Walton-1/+1
2012-12-12syntax: remove most code handling old-style syntax extensions.Graydon Hoare-35/+0
2012-12-03Update license, add license boilerplate to most files. Remainder will follow.Graydon Hoare-0/+10
2012-11-16Change spans to use byte offsets instead of char offsetsBrian Anderson-2/+2
2012-11-14Add types for character position and byte position in the codemapBrian Anderson-2/+2
2012-10-15rustc: Merge module and type namespaces. r=brsonPatrick Walton-1/+1
2012-09-20Revert "syntax: Make attributes sendable for rustdoc's benefit"Brian Anderson-10/+10
This reverts commit 90e3665fa79d32c3188169cfa992516fb36b81a8.
2012-09-20syntax: Make attributes sendable for rustdoc's benefitBrian Anderson-10/+10
2012-09-04libsyntax: "import" -> "use"Patrick Walton-3/+3
2012-08-26Camel case the option typeBrian Anderson-6/+6
2012-08-22intern identifiersPaul Stansifer-6/+6
2012-08-15Convert more core types to camel caseBrian Anderson-5/+5
2012-08-08Convert impls to new syntaxBrian Anderson-1/+1
2012-08-06Convert alt to match. Stop parsing altBrian Anderson-5/+5
2012-08-05Switch alts to use arrowsBrian Anderson-20/+16
2012-08-01Convert ret to returnBrian Anderson-15/+15