| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2019-07-07 | syntax: Pre-intern names of all built-in macros | Vadim Petrochenkov | -1/+1 | |
| They always end up interned anyway | ||||
| 2019-07-06 | Rollup merge of #62329 - matklad:no-peeking, r=petrochenkov | Mazdak Farrokhzad | -156/+93 | |
| Remove support for 1-token lookahead from the lexer `StringReader` maintained `peek_token` and `peek_span_src_raw` for look ahead. `peek_token` was used only by rustdoc syntax coloring. After moving peeking logic into highlighter, I was able to remove `peek_token` from the lexer. I tried to use `iter::Peekable`, but that wasn't as pretty as I hoped, due to buffered fatal errors. So I went with hand-rolled peeking. After that I've noticed that the only peeking behavior left was for raw tokens to test tt jointness. I've rewritten it in terms of trivia tokens, and not just spans. After that it became possible to simplify the awkward constructor of the lexer, which could return `Err` if the first peeked token contained error. | ||||
| 2019-07-05 | Rollup merge of #62292 - Centril:split-async-closures, r=cramertj | Mazdak Farrokhzad | -0/+1 | |
| Move `async || ...` closures into `#![feature(async_closure)]` The `async || expr` syntax is moved out from `#![feature(async_await)]` into its own gate `#![feature(async_closure)]`. New tracking issue: https://github.com/rust-lang/rust/issues/62290 Closes https://github.com/rust-lang/rust/issues/62214. cc https://github.com/rust-lang/rust/issues/62149 r? @varkor | ||||
| 2019-07-04 | make unwrap_or_abort non-generic again | Aleksey Kladov | -1/+1 | |
| 2019-07-04 | remove unused mk_sp_and_raw | Aleksey Kladov | -10/+3 | |
| 2019-07-04 | don't rely on spans when checking tokens for jointness | Aleksey Kladov | -47/+29 | |
| 2019-07-04 | slightly comment lexer API | Aleksey Kladov | -11/+18 | |
| 2019-07-04 | move constructors to top | Aleksey Kladov | -51/+51 | |
| 2019-07-04 | cleanup lexer constructors | Aleksey Kladov | -14/+6 | |
| 2019-07-04 | remove peek_span_src_raw from StringReader | Aleksey Kladov | -68/+45 | |
| 2019-07-04 | remove peek_token from StringReader | Aleksey Kladov | -18/+8 | |
| 2019-07-04 | remove StringReader::peek | Aleksey Kladov | -4/+0 | |
| The reader itself doesn't need ability to peek tokens, so it's better if clients implement this functionality. This hopefully becomes especially easy once we use iterator interface for lexer, but this is not too easy at the moment, because of buffered errors. | ||||
| 2019-07-04 | Rollup merge of #62297 - matklad:peek-delimited, r=petrochenkov | Mazdak Farrokhzad | -67/+72 | |
| refactor check_for_substitution No behavior change, just flatter and simpler code. r? @petrochenkov | ||||
| 2019-07-03 | Add separate 'async_closure' feature gate. | Mazdak Farrokhzad | -0/+1 | |
| 2019-07-02 | refactor check_for_substitution | Aleksey Kladov | -67/+72 | |
| No behavior change, just flatter and simpler code | ||||
| 2019-06-25 | cleanup: rename name_from to symbol_from | Aleksey Kladov | -20/+19 | |
| Lexer uses Symbols for a lot of stuff, not only for identifiers, so the "name" terminology is just confusing. | ||||
| 2019-06-25 | refactor lexer to use idiomatic borrowing | Aleksey Kladov | -121/+104 | |
| 2019-06-23 | let_chains: Inline visit_expr_with_let_maybe_allowed. | Mazdak Farrokhzad | -0/+1 | |
| 2019-06-12 | Auto merge of #60669 - c410-f3r:attrs-fn, r=petrochenkov | bors | -0/+1 | |
| Allow attributes in formal function parameters Implements https://github.com/rust-lang/rust/issues/60406. This is my first contribution to the compiler and since this is a large and complex project, I am not fully aware of the consequences of the changes I have made. **TODO** - [x] Forbid some built-in attributes. - [x] Expand cfg/cfg_attr | ||||
| 2019-06-10 | Auto merge of #60793 - Xanewok:raw-string-cleanup, r=petrochenkov | bors | -100/+58 | |
| lexer: Disallow bare CR in raw byte strings Handles bare CR ~but doesn't translate `\r\n` to `\n` yet in raw strings yet~ and translates CRLF to LF in raw strings. As a side-note I think it'd be good to change the `unescape_` to return plain iterators to reduce some boilerplate (e.g. `has_error` could benefit from collecting `Result<T>` and aborting early on errors) but will do that separately, unless I missed something here that prevents it. @matklad @petrochenkov thoughts? | ||||
| 2019-06-09 | Actually translate CRLF in raw byte strings and unify unescape impl | Igor Matuszewski | -2/+2 | |
| 2019-06-09 | Add a doc comment for scan_raw_string | Igor Matuszewski | -0/+2 | |
| 2019-06-09 | Allow attributes in formal function parameters | Caio | -0/+1 | |
| 2019-06-09 | Translate CRLF -> LF in raw (byte) strings | Igor Matuszewski | -2/+2 | |
| 2019-06-08 | Prohibit bare CRs in raw byte strings | Igor Matuszewski | -70/+24 | |
| 2019-06-08 | Validate and transcribe raw strings via unescape module | Igor Matuszewski | -21/+24 | |
| 2019-06-08 | syntax: Remove `Deref` impl from `Token` | Vadim Petrochenkov | -1/+1 | |
| 2019-06-08 | syntax: Move most of the `TokenKind` methods to `Token` | Vadim Petrochenkov | -3/+3 | |
| 2019-06-08 | Remove redundant, commented out code | Igor Matuszewski | -6/+0 | |
| It was commented out as part of https://github.com/rust-lang/rust/commit/8a8e497ae786ffc032c1e68fc23da0edcf6fa5e3. Done probably by accident, since the code in question was moved to a match arm, along with newly introduced logic to detect bare CRs in raw strings. | ||||
| 2019-06-08 | Separate a `scan_raw_string` (similar `raw_byte` variant) | Igor Matuszewski | -77/+82 | |
| 2019-06-08 | Clean up minor bits | Igor Matuszewski | -1/+1 | |
| 2019-06-06 | syntax: Remove duplicate span from `token::Ident` | Vadim Petrochenkov | -16/+6 | |
| 2019-06-06 | syntax: Remove duplicate span from `token::Lifetime` | Vadim Petrochenkov | -9/+5 | |
| 2019-06-06 | syntax: Add some helper methods to `Token` | Vadim Petrochenkov | -39/+26 | |
| 2019-06-06 | syntax: Use `Token` in `StringReader` and `TokenTreesReader` | Vadim Petrochenkov | -46/+32 | |
| 2019-06-06 | syntax: Use `Token` in `TokenTree::Token` | Vadim Petrochenkov | -23/+19 | |
| 2019-06-06 | syntax: Rename `TokenAndSpan` into `Token` | Vadim Petrochenkov | -79/+64 | |
| 2019-06-06 | syntax: Rename `Token` into `TokenKind` | Vadim Petrochenkov | -17/+17 | |
| 2019-05-27 | Pre-intern "0", "1", ..., "9", and use where appropriate. | Nicholas Nethercote | -2/+2 | |
| 2019-05-23 | syntax: Turn `token::Lit` into a struct | Vadim Petrochenkov | -54/+51 | |
| 2019-05-21 | Move `edition` outside the hygiene lock and avoid accessing it | John Kåre Alsaker | -15/+16 | |
| 2019-05-16 | Auto merge of #60763 - matklad:tt-parser, r=petrochenkov | bors | -37/+56 | |
| Move token tree related lexer state to a separate struct Just a types-based refactoring. We only used a bunch of fields when tokenizing into a token tree, so let's move them out of the base lexer | ||||
| 2019-05-13 | move raw span to tt reader | Aleksey Kladov | -1/+2 | |
| See https://github.com/rust-lang/rust/pull/50838/files#r283296243 for explanation how jointness checking works with *next* pair | ||||
| 2019-05-13 | move span and token to tt reader | Aleksey Kladov | -38/+34 | |
| 2019-05-13 | Move token tree related lexer state to a separate struct | Aleksey Kladov | -44/+66 | |
| We only used a bunch of fields when tokenizing into a token tree, so let's move them out of the base lexer | ||||
| 2019-05-11 | Move literal parsing code into a separate file | Vadim Petrochenkov | -13/+6 | |
| Remove some dead code | ||||
| 2019-05-11 | Eliminate `comments::Literal` | Vadim Petrochenkov | -26/+3 | |
| 2019-05-09 | Rollup merge of #60188 - estebank:recover-block, r=varkor | Mazdak Farrokhzad | -1/+2 | |
| Identify when a stmt could have been parsed as an expr There are some expressions that can be parsed as a statement without a trailing semicolon depending on the context, which can lead to confusing errors due to the same looking code being accepted in some places and not others. Identify these cases and suggest enclosing in parenthesis making the parse non-ambiguous without changing the accepted grammar. Fix #54186, cc #54482, fix #59975, fix #47287. | ||||
| 2019-05-06 | review comments: fix typo and add comments | Esteban Küber | -1/+1 | |
| 2019-05-02 | introduce unescape module | Aleksey Kladov | -443/+142 | |
| Currently, we deal with escape sequences twice: once when we lex a string, and a second time when we unescape literals. This PR aims to remove this duplication, by introducing a new `unescape` mode as a single source of truth for character escaping rules | ||||
