summary refs log tree commit diff
path: root/src/libsyntax/parse/attr.rs
AgeCommit message (Collapse)AuthorLines
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-3/+2
Closes #2569
2014-03-28syntax: Accept meta matchers in macrosAlex Crichton-11/+8
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-20syntax: Tidy up parsing the new attribute syntaxAlex Crichton-28/+18
2014-03-20Added new attribute syntax with backward compatibility.Daniel Fagnan-9/+27
Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-2/+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-1/+1
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-0/+2
2014-03-01libsyntax: Mechanically change `~[T]` to `Vec<T>`Patrick Walton-12/+12
2014-02-02libsyntax: De-`@str` literal strings in the ASTPatrick Walton-2/+2
2014-02-02libsyntax: Introduce an `InternedString` type to reduce `@str` in thePatrick Walton-1/+1
compiler and use it for attributes
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-6/+6
2014-01-02libsyntax: De-`@mut` `token` in the parserPatrick Walton-6/+6
2014-01-02libsyntax: Make the parser mutablePatrick Walton-16/+17
2013-11-28Register new snapshotsAlex Crichton-3/+3
2013-10-30syntax: Forbid non-string literals in meta items. #623Brian Anderson-0/+10
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-2/+2
Who doesn't like a massive renaming?
2013-09-30syntax: Remove usage of fmt!Alex Crichton-4/+4
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-2/+2
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