| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2017-08-30 | Make fields of `Span` private | Vadim Petrochenkov | -3/+4 | |
| 2017-08-21 | Auto merge of #43540 - petrochenkov:pathrelax, r=nikomatsakis | bors | -3/+1 | |
| syntax: Relax path grammar TLDR: Accept the disambiguator `::` in "type" paths (`Type::<Args>`), accept the disambiguator `::` before parenthesized generic arguments (`Fn::(Args)`). The "turbofish" disambiguator `::<>` in expression paths is a necessary evil required for path parsing to be both simple and to give reasonable results. Since paths in expressions usually refer to values (but not necessarily, e.g. `Struct::<u8> { field: 0 }` is disambiguated, but refers to a type), people often consider `::<>` to be inherent to *values*, and not *expressions* and want to write disambiguated paths for values even in contexts where disambiguation is not strictly necessary, for example when a path is passed to a macro `m!(Vec::<i32>::new)`. The problem is that currently, if the disambiguator is not *required*, then it's *prohibited*. This results in confusion - see https://github.com/rust-lang/rust/issues/41740, https://internals.rust-lang.org/t/macro-path-uses-novel-syntax/5561. This PR makes the disambiguator *optional* instead of prohibited in contexts where it's not strictly required, so people can pass paths to macros in whatever form they consider natural (e.g. disambiguated form for value paths). This PR also accepts the disambiguator in paths with parenthesized arguments (`Fn::(Args)`) for consistency and to simplify testing of stuff like https://github.com/rust-lang/rust/pull/41856#issuecomment-301219194. Closes https://github.com/rust-lang/rust/issues/41740 cc @rust-lang/lang r? @nikomatsakis | ||||
| 2017-08-15 | use field init shorthand EVERYWHERE | Zack M. Davis | -3/+3 | |
| Like #43008 (f668999), but _much more aggressive_. | ||||
| 2017-08-11 | Issue warnings for unnecessary path disambiguators | Vadim Petrochenkov | -3/+1 | |
| 2017-08-01 | Fixed all unnecessary muts in language core | Isaac van Bakel | -2/+2 | |
| 2017-07-24 | Make the macro parser theory description more accurate | Piotr Czarnecki | -100/+102 | |
| 2017-07-07 | Only match a fragment specifier the if it starts with certain tokens. | kennytm | -4/+70 | |
| Fixes #24189. Fixes #26444. Fixes #27832. Fixes #34030. Fixes #35650. Fixes #39964. Fixes the 4th comment in #40569. Fixes the issue blocking #40984. | ||||
| 2017-06-26 | Simplify `hygiene::Mark` application, and | Jeffrey Seyfried | -15/+9 | |
| remove variant `Token::SubstNt` in favor of `quoted::TokenTree::MetaVar`. | ||||
| 2017-06-08 | Speed up expansion. | Mark Simulacrum | -17/+23 | |
| This reduces duplication, thereby increasing expansion speed. | ||||
| 2017-05-18 | Add an option to the parser to avoid parsing out of line modules | Nick Cameron | -2/+6 | |
| This is useful if parsing from stdin or a String and don't want to try and read in a module from another file. Instead we just leave a stub in the AST. | ||||
| 2017-05-16 | Rollup merge of #41957 - llogiq:clippy-libsyntax, r=petrochenkov | Mark Simulacrum | -28/+29 | |
| Fix some clippy warnings in libsyntax This is mostly removing stray ampersands, needless returns and lifetimes. Basically a lot of small changes. | ||||
| 2017-05-15 | adressed comments by @kennytm and @petrochenkov | Andre Bogus | -23/+27 | |
| 2017-05-15 | Fix regression in `macro_rules!` name matching. | Jeffrey Seyfried | -5/+6 | |
| 2017-05-12 | Fix some clippy warnings in libsyntax | Andre Bogus | -26/+23 | |
| This is mostly removing stray ampersands, needless returns and lifetimes. | ||||
| 2017-04-15 | Implementation of the `vis` macro matcher. | Daniel Keep | -0/+1 | |
| 2017-03-30 | Improve `Path` spans. | Jeffrey Seyfried | -1/+1 | |
| 2017-03-29 | Refactor how spans are combined in the parser. | Jeffrey Seyfried | -5/+4 | |
| 2017-03-21 | Refactor parsing of trait object types | Vadim Petrochenkov | -1/+1 | |
| 2017-03-14 | Cleanup. | Jeffrey Seyfried | -1/+1 | |
| 2017-03-03 | Integrate `TokenStream`. | Jeffrey Seyfried | -21/+11 | |
| 2017-02-28 | Add warning cycle. | Jeffrey Seyfried | -9/+23 | |
| 2017-02-28 | Remove `Token::MatchNt`. | Jeffrey Seyfried | -8/+6 | |
| 2017-02-28 | Add `syntax::ext::tt::quoted::{TokenTree, ..}` and remove ↵ | Jeffrey Seyfried | -20/+24 | |
| `tokenstream::TokenTree::Sequence`. | ||||
| 2017-01-20 | Rollup merge of #39118 - jseyfried:token_tree_based_parser, r=nrc | Alex Crichton | -20/+4 | |
| Refactor the parser to consume token trees This is groundwork for efficiently parsing attribute proc macro invocations, bang macro invocations, and `TokenStream`-based attributes and fragment matchers. This improves parsing performance by 8-15% and expansion performance by 0-5% on a sampling of the compiler's crates. r? @nrc | ||||
| 2017-01-17 | Avoid interpolated token trees. | Jeffrey Seyfried | -16/+1 | |
| 2017-01-17 | Refactor the parser to consume token trees. | Jeffrey Seyfried | -4/+3 | |
| 2017-01-17 | syntax: Rename parse_ty -> parse_ty_no_plus, parse_ty_sum -> parse_ty | Vadim Petrochenkov | -1/+1 | |
| 2016-12-07 | macros: fix the expected paths for a non-inline module matched by an `item` ↵ | Jeffrey Seyfried | -3/+4 | |
| fragment. | ||||
| 2016-11-12 | Remove extra level of nesting. | Mark-Simulacrum | -35/+32 | |
| 2016-11-12 | Move next_eis out of main loop to avoid re-allocating and dropping it. | Mark-Simulacrum | -1/+2 | |
| 2016-11-12 | Use SmallVector for eof and bb eis. | Mark-Simulacrum | -6/+4 | |
| 2016-11-12 | Factor out inner current Earley item loop. | Mark-Simulacrum | -146/+153 | |
| Change multiple functions to be non-public. Change nameize to accept an iterator so as to avoid an allocation. | ||||
| 2016-11-12 | Refactor parse_nt. | Mark-Simulacrum | -8/+13 | |
| 2016-11-12 | Factor out NamedParseResult. | Mark-Simulacrum | -4/+3 | |
| 2016-11-12 | Clean up extraneous &mut. | Mark-Simulacrum | -1/+1 | |
| 2016-11-12 | Refactor to extending from a drain instead of while looping. | Mark-Simulacrum | -3/+1 | |
| 2016-11-12 | Remove unused argument from nameize. | Mark-Simulacrum | -6/+6 | |
| Also makes nameize non-public since it's only locally used. | ||||
| 2016-11-12 | Cleanup macro_parser::parse, removing a few clones. | Mark-Simulacrum | -51/+35 | |
| 2016-11-04 | Improve `tt`-heavy expansion performance. | Jeffrey Seyfried | -3/+12 | |
| 2016-11-03 | Move doc comment desugaring into the parser. | Jeffrey Seyfried | -1/+1 | |
| 2016-11-03 | Avoid recontructing the `Parser` in `macro_parser.rs`. | Jeffrey Seyfried | -21/+16 | |
| 2016-11-03 | Reduce the size of `Token` and make it cheaper to clone by refactoring | Jeffrey Seyfried | -7/+6 | |
| `Token::Interpolated(Nonterminal)` -> `Token::Interpolated(Rc<Nonterminal>)`. | ||||
| 2016-10-29 | Move `CrateConfig` from `Crate` to `ParseSess`. | Jeffrey Seyfried | -7/+2 | |
| 2016-10-25 | Don't use `Rc` in `TokenTreeOrTokenTreeVec`. | Nicholas Nethercote | -3/+3 | |
| This avoids 800,000 allocations when compiling html5ever. | ||||
| 2016-10-25 | Use `SmallVector` for the stack in `macro_parser::parse`. | Nicholas Nethercote | -6/+4 | |
| This avoids 800,000 heap allocations when compiling html5ever. | ||||
| 2016-10-21 | Replace the `String` in `ParseResult::Failure` with `Token`. | Nicholas Nethercote | -6/+13 | |
| This lets us delay creation of failure messages until they are needed, which avoids ~1.6M allocations in html5ever. | ||||
| 2016-10-21 | Avoid an unnecessary clone in `macro_parser::parse`. | Nicholas Nethercote | -1/+1 | |
| This avoids ~800,000 allocations in html5ever. | ||||
| 2016-10-19 | Rollup merge of #37208 - jseyfried:fix_partially_consumed_tokens_in_macros, ↵ | Eduard-Mihai Burtescu | -12/+9 | |
| r=nrc macros: fix partially consumed tokens in macro matchers Fixes #37175. This PR also avoids re-transcribing the tokens consumed by a matcher (and cloning the `TtReader` once per matcher), which improves expansion performance of the test case from #34630 by ~8%. r? @nrc | ||||
| 2016-10-17 | Fix partially consumed tokens in macro matchers. | Jeffrey Seyfried | -12/+9 | |
| 2016-10-14 | Avoid many CrateConfig clones. | Nicholas Nethercote | -1/+1 | |
| This commit changes `ExtCtx::cfg()` so it returns a `CrateConfig` reference instead of a clone. As a result, it also changes all of the `cfg()` callsites to explicitly clone... except one, because the commit also changes `macro_parser::parse()` to take `&CrateConfig`. This is good, because that function can be hot, and `CrateConfig` is expensive to clone. This change almost halves the number of heap allocations done by rustc for `html5ever` in rustc-benchmarks suite, which makes compilation 1.20x faster. | ||||
