about summary refs log tree commit diff
path: root/src/libsyntax/ext
AgeCommit message (Collapse)AuthorLines
2017-04-17Auto merge of #41282 - arielb1:missing-impl-item, r=petrochenkovbors-2/+2
libsyntax/parse: fix missing kind error reporting Fixes #41161. Fixes #41239.
2017-04-17libsyntax/parse: improve associated item error reportingAriel Ben-Yehuda-2/+2
Fixes #41161. Fixes #41239.
2017-04-15feature gate :vis matcherAlex Burka-22/+45
2017-04-15widen :vis follow setAlex Burka-4/+4
2017-04-15parse interpolated visibility tokensAlex Burka-1/+2
2017-04-15update :vis implementation to current rustAlex Burka-6/+6
2017-04-15Implementation of the `vis` macro matcher.Daniel Keep-1/+15
2017-04-12First attempt at global_asm! macroA.J. Gardner-0/+1
2017-04-03Fix bug parsing `#[derive]` macro invocations.Jeffrey Seyfried-1/+2
2017-03-30Improve `Path` spans.Jeffrey Seyfried-16/+31
2017-03-29Refactor how spans are combined in the parser.Jeffrey Seyfried-5/+4
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-141/+110
2017-03-29Move `syntax::ext::hygiene` to `syntax_pos::hygiene`.Jeffrey Seyfried-132/+5
2017-03-27Rollup merge of #40813 - jseyfried:fix_expansion_regression, r=nrcAlex Crichton-1/+1
macros: fix ICE on some nested macro definitions Fixes #40770. r? @nrc
2017-03-27Fix various useless derefs and slicingsOliver Schneider-1/+1
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-21Refactor parsing of trait object typesVadim Petrochenkov-3/+3
2017-03-19Auto merge of #40346 - jseyfried:path_and_tokenstream_attr, r=nrcbors-109/+91
`TokenStream`-based attributes, paths in attribute and derive macro invocations This PR - refactors `Attribute` to use `Path` and `TokenStream` instead of `MetaItem`. - supports macro invocation paths for attribute procedural macros. - e.g. `#[::foo::attr_macro] struct S;`, `#[cfg_attr(all(), foo::attr_macro)] struct S;` - supports macro invocation paths for derive procedural macros. - e.g. `#[derive(foo::Bar, super::Baz)] struct S;` - supports arbitrary tokens as arguments to attribute procedural macros. - e.g. `#[foo::attr_macro arbitrary + tokens] struct S;` - supports using arbitrary tokens in "inert attributes" with derive procedural macros. - e.g. `#[derive(Foo)] struct S(#[inert arbitrary + tokens] i32);` where `#[proc_macro_derive(Foo, attributes(inert))]` r? @nrc
2017-03-14Liberalize attributes.Jeffrey Seyfried-71/+71
2017-03-14Refactor `Attribute` to use `Path` and `TokenStream` instead of `MetaItem`.Jeffrey Seyfried-39/+21
2017-03-14Cleanup.Jeffrey Seyfried-1/+1
2017-03-12Rollup merge of #40369 - petrochenkov:segspan, r=eddybCorey Farwell-7/+12
Give spans to individual path segments in AST And use these spans in path resolution diagnostics. The spans are spans of identifiers in segments, not whole segments. I'm not sure what spans are more useful in general, but identifier spans are a better fit for resolve errors. HIR still doesn't have spans. Fixes https://github.com/rust-lang/rust/pull/38927#discussion_r95336667 https://github.com/rust-lang/rust/pull/38890#issuecomment-271731008 r? @nrc @eddyb
2017-03-11Auto merge of #40220 - jseyfried:ast_macro_def, r=nrcbors-111/+28
syntax: add `ast::ItemKind::MacroDef`, simplify hygiene info This PR - adds a new variant `MacroDef` to `ast::ItemKind` for `macro_rules!` and eventually `macro` items, - [breaking-change] forbids macro defs without a name (`macro_rules! { () => {} }` compiles today), - removes `ast::MacroDef`, and - no longer uses `Mark` and `Invocation` to identify and characterize macro definitions. - We used to apply (at least) two `Mark`s to an expanded identifier's `SyntaxContext` -- the definition mark(s) and the expansion mark(s). We now only apply the latter. r? @nrc
2017-03-10Give spans to individual path segments in ASTVadim Petrochenkov-7/+12
2017-03-10Expect macro defs in save-analysis and add expn info to spans for attr proc ↵Nick Cameron-1/+13
macros
2017-03-10Avoid using `Mark` and `Invocation` for macro defs.Jeffrey Seyfried-16/+5
2017-03-10Move `resolve_invoc` from `syntax` to `resolve`.Jeffrey Seyfried-63/+11
2017-03-10Refactor out `ast::ItemKind::MacroDef`.Jeffrey Seyfried-35/+15
2017-03-03Integrate `TokenStream`.Jeffrey Seyfried-107/+93
2017-03-03Remove lifetime parameter from `syntax::tokenstream::Cursor`.Jeffrey Seyfried-1/+1
2017-03-02Auto merge of #39655 - durka:recursion-limit-suggestion, r=nikomatsakisbors-4/+10
suggest doubling recursion limit in more situations Fixes #38852. r? @bluss
2017-03-02note -> helpAlex Burka-1/+1
2017-02-28Add warning cycle.Jeffrey Seyfried-11/+27
2017-02-28Merge `repeat_idx` and `repeat_len`.Jeffrey Seyfried-17/+15
2017-02-28Remove `Token::MatchNt`.Jeffrey Seyfried-68/+78
2017-02-28Add `syntax::ext::tt::quoted::{TokenTree, ..}` and remove ↵Jeffrey Seyfried-193/+358
`tokenstream::TokenTree::Sequence`.
2017-02-28Avoid `Token::{OpenDelim, CloseDelim}`.Jeffrey Seyfried-16/+22
2017-02-28Remove `ext::tt::transcribe::tt_next_token`.Jeffrey Seyfried-149/+124
2017-02-28Clean up `ext::tt::transcribe::TtFrame`, rename to `Frame`.Jeffrey Seyfried-57/+84
2017-02-28Remove a `loop` in `ext::tt::transcribe`.Jeffrey Seyfried-32/+23
2017-02-23Move MacroKind into Def::MacroJosh Driver-1/+1
2017-02-16Refactor macro resolution errors + add derive macro suggestionsJosh Driver-16/+42
2017-02-12Allow using inert attributes from `proc_macro_derive`s with ↵Jeffrey Seyfried-228/+231
`#![feature(proc_macro)]`.
2017-02-12Move legacy custom derives collection into `resolver.find_attr_invoc()`.Jeffrey Seyfried-35/+1
2017-02-09suggest doubling recursion limit in more situationsAlex Burka-4/+10
2017-02-05Move derive macro expansion into the MacroExpanderJosh Driver-8/+330
This removes the expand_derives function, and sprinkles the functionality throughout the Invocation Collector, Expander and Resolver.
2017-02-05Rename CustomDerive to ProcMacroDerive for macros 1.1Josh Driver-3/+7
2017-02-05Make builtin derives a SyntaxExtensionJosh Driver-3/+9
This allows builtin derives to be registered and resolved, just like other derive types.
2017-02-03Bump version, upgrade bootstrapAlex Crichton-2/+0
This commit updates the version number to 1.17.0 as we're not on that version of the nightly compiler, and at the same time this updates src/stage0.txt to bootstrap from freshly minted beta compiler and beta Cargo.