about summary refs log tree commit diff
path: root/src/libsyntax/ext/cfg.rs
AgeCommit message (Collapse)AuthorLines
2015-12-15Move built-in syntax extensions to a separate crateSeo Sanghyeon-45/+0
2015-11-26Added stmt_expr_attribute feature gateMarvin Löbel-2/+8
2015-11-10Use deref coercionsSeo Sanghyeon-1/+1
2015-10-27Don't panic for fatal errors in attribute parsing.Eli Friedman-1/+1
2015-10-27Delete unnecessary ParserAttr trait.Eli Friedman-1/+0
2015-08-17feature gate `cfg(target_feature)`.Huon Wilson-1/+2
This is theoretically a breaking change, but GitHub search turns up no uses of it, and most non-built-in cfg's are passed via cargo features, which look like `feature = "..."`, and hence can't overlap.
2015-04-05Work towards a non-panicing parser (libsyntax)Phil Dawes-1/+1
- Functions in parser.rs return PResult<> rather than panicing - Other functions in libsyntax call panic! explicitly for now if they rely on panicing behaviour. - 'panictry!' macro added as scaffolding while converting panicing functions. (This does the same as 'unwrap()' but is easier to grep for and turn into try!()) - Leaves panicing wrappers for the following functions so that the quote_* macros behave the same: - parse_expr, parse_item, parse_pat, parse_arm, parse_ty, parse_stmt
2015-02-27Replace MacExpr / MacPat / MacItems with MacEagerKeegan McAllister-1/+1
MacEager is a MacResult implementation for the common case where you've already built each form of AST that you might return. Fixes #17637. Based on #18814. This is a [breaking-change] for syntax extensions: * MacExpr::new becomes MacEager::expr. * MacPat::new becomes MacEager::pat. * MacItems::new becomes MacEager::items. It takes a SmallVector directly, not an iterator.
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-1/+1
2014-10-28Use PascalCase for token variantsBrendan Zabarauskas-1/+1
2014-10-12Continue cfg syntax transitionSteven Fackler-20/+8
All deprecation warnings have been converted to errors. This includes the warning for multiple cfgs on one item. We'll leave that as an error for some period of time to ensure that all uses are updated before the behavior changes from "or" to "and".
2014-09-30Turn on cfg format warningsSteven Fackler-3/+0
2014-09-27Convert cfg syntax to new systemSteven Fackler-7/+12
This removes the ability to use `foo(bar)` style cfgs. Switch them to `foo_bar` or `foo="bar"` instead. [breaking-change]
2014-09-14syntax: fix fallout from using ptr::P.Eduard Burtescu-2/+2
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-2/+4
2014-07-03Simplify creating a parser from a token treePiotr Jawniak-7/+1
Closes #15306
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-1/+3
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-04-16syntax: unify all MacResult's into a single trait.Huon Wilson-2/+2
There's now one unified way to return things from a macro, instead of being able to choose the `AnyMacro` trait or the `MRItem`/`MRExpr` variants of the `MacResult` enum. This does simplify the logic handling the expansions, but the biggest value of this is it makes macros in (for example) type position easier to implement, as there's this single thing to modify. By my measurements (using `-Z time-passes` on libstd and librustc etc.), this appears to have little-to-no impact on expansion speed. There are presumably larger costs than the small number of extra allocations and virtual calls this adds (notably, all `macro_rules!`-defined macros have not changed in behaviour, since they had to use the `AnyMacro` trait anyway).
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-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-2/+7
2014-03-01libsyntax: Mechanically change `~[T]` to `Vec<T>`Patrick Walton-1/+1
2014-02-02libsyntax: Introduce an `InternedString` type to reduce `@str` in thePatrick Walton-3/+4
compiler and use it for attributes
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-2/+2
2014-01-02libsyntax: De-`@mut` `token` in the parserPatrick Walton-1/+1
2014-01-02libsyntax: Make the parser mutablePatrick Walton-1/+3
2013-12-29Start passing around &mut ExtCtxtSteven Fackler-1/+1
2013-12-28Stop using @ExtCtxtSteven Fackler-1/+1
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-2/+2
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-1/+1
cc #5898
2013-08-01syntax: implement cfg!() which evaluates to true/false where #[cfg] would ↵Huon Wilson-0/+45
keep/remove. Example: if cfg!(test) { calculation_to_run_only_when_testing(); }