about summary refs log tree commit diff
path: root/src/libsyntax_ext/proc_macro_harness.rs
AgeCommit message (Collapse)AuthorLines
2019-12-30Rename directories for some crates from `syntax_x` to `rustc_x`Vadim Petrochenkov-463/+0
`syntax_expand` -> `rustc_expand` `syntax_pos` -> `rustc_span` `syntax_ext` -> `rustc_builtin_macros`
2019-12-22Format the worldMark Rousskov-110/+121
2019-12-201. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.Mazdak Farrokhzad-2/+2
2. mir::Mutability -> ast::Mutability.
2019-11-25Various cleanupsEsteban Küber-1/+1
2019-11-11Fix error message about exported symbols from proc-macro cratesLukas Kalbertodt-4/+6
Someone forgot to update the error message after `#[proc_macro]` and `#[proc_macro_attribute]` were stabilized.
2019-11-06Make doc comments cheaper with `AttrKind`.Nicholas Nethercote-6/+8
`AttrKind` is a new type with two variants, `Normal` and `DocComment`. It's a big performance win (over 10% in some cases) because `DocComment` lets doc comments (which are common) be represented very cheaply. `Attribute` gets some new helper methods to ease the transition: - `has_name()`: check if the attribute name matches a single `Symbol`; for `DocComment` variants it succeeds if the symbol is `sym::doc`. - `is_doc_comment()`: check if it has a `DocComment` kind. - `{get,unwrap}_normal_item()`: extract the item from a `Normal` variant; panic otherwise. Fixes #60935.
2019-11-06Remove unnecessary `Deref` impl for `Attribute`.Nicholas Nethercote-6/+6
This kind of thing just makes the code harder to read.
2019-10-27rustc, rustc_passes: don't depend on syntax_expand.Mazdak Farrokhzad-1/+1
This is done by moving some data definitions to syntax::expand.
2019-10-22Deprecated proc_macro doesn't trigger warning on build librarywangxiangqing-0/+1
Change-Id: Ib3a396e7334d209fe6c6ef425bbfc7b2ae471378
2019-10-22Deprecated proc_macro doesn't trigger warning on build librarywangxiangqing-0/+10
Change-Id: Ib3a396e7334d209fe6c6ef425bbfc7b2ae471378
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-4/+4
2019-10-15syntax::parse::sess -> syntax::sessMazdak Farrokhzad-1/+1
2019-10-13ast: remove implicit pprust dependency via Display.Mazdak Farrokhzad-8/+20
Instead just use `pprust::path_to_string(..)` where needed. This has two benefits: a) The AST definition is now independent of printing it. (Therefore we get closer to extracting a data-crate.) b) Debugging should be easier as program flow is clearer.
2019-09-26Rename `Item.node` to `Item.kind`varkor-2/+2
2019-09-17Generate proc macro harness in AST order.Aaron Hill-47/+62
This ensures that we match the order used by proc macro metadata serialization. Fixes #64251
2019-09-15Give more `Idents` spansMatthew Jasper-7/+7
2019-09-05Simplify std lib injectionMatthew Jasper-27/+5
2019-09-05Add `with_{def_site,call_site,legacy}_ctxt,` methods to `Span`Vadim Petrochenkov-1/+2
Use these to create call-site spans for AST passes when needed.
2019-09-05Make use of hygiene in AST passesMatthew Jasper-34/+52
2019-08-15hygiene: `ExpnInfo` -> `ExpnData`Vadim Petrochenkov-2/+2
For naming consistency with everything else in this area
2019-08-15hygiene: Merge `ExpnInfo` and `InternalExpnData`Vadim Petrochenkov-2/+1
2019-08-15`Ident::with_empty_ctxt` -> `Ident::with_dummy_span`Vadim Petrochenkov-2/+2
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.
2019-08-14expand: Unimplement `MutVisitor` on `MacroExpander`Vadim Petrochenkov-4/+5
Each call to `fully_expand_fragment` is something unique, interesting, and requiring attention. It represents a "root" of expansion and its use means that something unusual is happening, like eager expansion or expansion performed outside of the primary expansion pass. So, it shouldn't be hide under a generic visitor call. Also, from all the implemented visitor methods only two were actually used.
2019-07-31Replace AstBuilder with inherent methodsMark Rousskov-1/+0
2019-07-31Remove Span argument from ExtCtxt::attributeMark Rousskov-2/+2
MetaItem.span was always equivalent
2019-07-27syntax_ext: `proc_macro_decls` -> `proc_macro_harness`Vadim Petrochenkov-0/+414
Few other minor renamings for consistency. Remove one unused dependency from `rustc_passes`. Fix libsyntax tests. Fix rebase.