about summary refs log tree commit diff
path: root/src/libsyntax/ext/placeholders.rs
AgeCommit message (Collapse)AuthorLines
2018-12-25Remove licensesMark Rousskov-10/+0
2018-09-26Remove OneVectorljedrz-6/+6
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-3/+3
2018-08-23Use optimized SmallVec implementationIgor Gutorov-11/+11
2018-08-19mv (mod) codemap source_mapDonato Sciarra-1/+1
2018-08-13Move SmallVec and ThinVec out of libsyntaxljedrz-14/+15
2018-06-23expansion: Rename `Expansion` to `AstFragment`Vadim Petrochenkov-28/+29
2018-05-22rustc: Correctly pretty-print macro delimitersAlex Crichton-0/+1
This commit updates the `Mac_` AST structure to keep track of the delimiters that it originally had for its invocation. This allows us to faithfully pretty-print macro invocations not using parentheses (e.g. `vec![...]`). This in turn helps procedural macros due to #43081. Closes #50840
2018-04-03expand macro invocations in `extern {}` blocksAustin Bonander-0/+11
2018-02-18Change ast::Visibility to Spanned typeSeiichi Uchida-1/+1
2017-10-17Lifting Generics from MethodSig to TraitItem and ImplItem since we want to ↵Sunjay Varma-2/+3
support generics in each variant of TraitItem and ImplItem
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-9/+9
Like #43008 (f668999), but _much more aggressive_.
2017-07-28syntax: Capture a `TokenStream` when parsing itemsAlex Crichton-0/+2
This is then later used by `proc_macro` to generate a new `proc_macro::TokenTree` which preserves span information. Unfortunately this isn't a bullet-proof approach as it doesn't handle the case when there's still other attributes on the item, especially inner attributes. Despite this the intention here is to solve the primary use case for procedural attributes, attached to functions as outer attributes, likely bare. In this situation we should be able to now yield a lossless stream of tokens to preserve span information.
2017-07-28syntax: Add `tokens: Option<TokenStream>` to ItemAlex Crichton-0/+1
This commit adds a new field to the `Item` AST node in libsyntax to optionally contain the original token stream that the item itself was parsed from. This is currently `None` everywhere but is intended for use later with procedural macros.
2017-03-29Move `syntax::ext::hygiene` to `syntax_pos::hygiene`.Jeffrey Seyfried-2/+2
2017-03-25Fix ICE with nested macros in certain situations.Jeffrey Seyfried-1/+1
2017-03-22Introduce HirId, a replacement for NodeId after lowering to HIR.Michael Woerister-11/+3
HirId has a more stable representation than NodeId, meaning that modifications to one item don't influence (part of) the IDs within other items. The other part is a DefIndex for which there already is a way of stable hashing and persistence. This commit introduces the HirId type and generates a HirId for every NodeId during HIR lowering, but the resulting values are not yet used anywhere, except in consistency checks.
2017-03-10Refactor out `ast::ItemKind::MacroDef`.Jeffrey Seyfried-15/+0
2017-03-03Integrate `TokenStream`.Jeffrey Seyfried-1/+2
2017-02-12Allow using inert attributes from `proc_macro_derive`s with ↵Jeffrey Seyfried-2/+11
`#![feature(proc_macro)]`.
2016-12-22Refactor how global paths are represented (for both ast and hir).Jeffrey Seyfried-1/+1
2016-12-18Remove scope placeholders, remove method `add_macro` of `ext::base::Resolver`.Jeffrey Seyfried-36/+14
2016-11-20Move `syntax::util::interner` -> `syntax::symbol`, cleanup.Jeffrey Seyfried-2/+2
2016-10-07Cleanup `depth`s.Jeffrey Seyfried-1/+2
2016-09-15Remove `MacroRulesTT`.Jeffrey Seyfried-3/+10
2016-09-13Differentiate between monotonic and non-monotonic expansion andJeffrey Seyfried-3/+7
only assign node ids during monotonic expansion.
2016-09-13Perform node id assignment and `macros_at_scope` construction duringJeffrey Seyfried-4/+57
the `InvocationCollector` and `PlaceholderExpander` folds.
2016-09-07Implement stackless placeholder expansion.Jeffrey Seyfried-4/+7
2016-09-05Add module `ext::placeholders` with `placeholder()` and `PlaceholderExpander`.Jeffrey Seyfried-0/+172