| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-07-10 | rustc_lexer: Simplify shebang parsing once more | Vadim Petrochenkov | -15/+12 | |
| 2020-05-29 | rustc_lexer: Optimize shebang detection slightly | Vadim Petrochenkov | -19/+18 | |
| 2020-05-25 | Fix bug in shebang handling | Russell Cohen | -7/+76 | |
| Shebang handling was too agressive in stripping out the first line in cases where it is actually _not_ a shebang, but instead, valid rust (#70528). This is a second attempt at resolving this issue (the first attempt was flawed, for, among other reasons, causing an ICE in certain cases (#71372, #71471). The behavior is now codified by a number of UI tests, but simply: For the first line to be a shebang, the following must all be true: 1. The line must start with `#!` 2. The line must contain a non whitespace character after `#!` 3. The next character in the file, ignoring comments & whitespace must not be `[` I believe this is a strict superset of what we used to allow, so perhaps a crater run is unnecessary, but probably not a terrible idea. | ||||
| 2020-05-13 | Replace some usages of the old `unescape_` functions in AST, clippy and tests. | Julian Wollersberger | -52/+6 | |
| 2020-05-13 | Unified `unescape_{char,byte,str,byte_str,raw_str,raw_byte_str}` methods ↵ | Julian Wollersberger | -4/+42 | |
| into one method `unescape_literal` with a mode argument. | ||||
| 2020-05-09 | Small doc improvements. | Julian Wollersberger | -2/+11 | |
| The phrasing is from the commit description of 395ee0b79f23b90593b01dd0a78451b8c93b0aa6 by @Matklad. | ||||
| 2020-04-28 | Revert "Rollup merge of #71372 - ayushmishra2005:shebang_stripping, r=estebank" | Eduard-Mihai Burtescu | -24/+1 | |
| This reverts commit 46a8dcef5c9e4de0d412c6ac3c4765cb4aef4f7f, reversing changes made to f28e3873c55eb4bdcfc496e1f300b97aeb0d189c. | ||||
| 2020-04-21 | Minor refactoring | Ayush Kumar Mishra | -1/+1 | |
| 2020-04-21 | Fix formatting issue | Ayush Kumar Mishra | -1/+0 | |
| 2020-04-21 | Refactoring and added test-cases #70528 | Ayush Kumar Mishra | -1/+25 | |
| 2020-04-21 | Fix #! (shebang) stripping account space issue #70528 | Ayush Kumar Mishra | -1/+1 | |
| 2020-04-02 | Handle unterminated raw strings with no #s properly | Russell Cohen | -1/+35 | |
| The modified code to handle parsing raw strings didn't properly account for the case where there was no "#" on either end and erroneously reported this strings as complete. This lead to a panic trying to read off the end of the file. | ||||
| 2020-03-31 | Fix tests to handle debug_assert | Russell Cohen | -0/+2 | |
| 2020-03-30 | Clean up redudant conditions and match exprs | Russell Cohen | -1/+1 | |
| 2020-03-29 | Cleanup error messages, improve docstrings | Russell Cohen | -17/+32 | |
| 2020-03-29 | Improve error messages for raw strings (#60762) | Russell Cohen | -23/+229 | |
| This diff improves error messages around raw strings in a few ways: - Catch extra trailing `#` in the parser. This can't be handled in the lexer because we could be in a macro that actually expects another # (see test) - Refactor & unify error handling in the lexer between ByteStrings and RawByteStrings - Detect potentially intended terminators (longest sequence of "#*" is suggested) | ||||
| 2020-03-20 | remove redundant returns (clippy::needless_return) | Matthias Krüger | -3/+3 | |
| 2020-03-06 | fix various typos | Matthias Krüger | -2/+2 | |
| 2020-02-13 | Spelling error "represening" to "representing" | Drew Ripberger | -1/+1 | |
| 2019-12-22 | Format the world | Mark Rousskov | -18/+9 | |
| 2019-11-10 | move syntax::parse -> librustc_parse | Mazdak Farrokhzad | -1/+1 | |
| also move MACRO_ARGUMENTS -> librustc_parse | ||||
| 2019-11-04 | librustc_lexer: Make nth_char method private | Igor Aleksanov | -1/+1 | |
| 2019-11-04 | librustc_lexer: Reorder imports in lib.rs | Igor Aleksanov | -3/+2 | |
| 2019-11-04 | librustc_lexer: Simplify "lifetime_or_char" method | Igor Aleksanov | -30/+37 | |
| 2019-11-03 | librustc_lexer: Simplify "raw_double_quoted_string" method | Igor Aleksanov | -25/+34 | |
| 2019-11-03 | librustc_lexer: Simplify "double_quoted_string" method | Igor Aleksanov | -6/+6 | |
| 2019-11-03 | librustc_lexer: Simplify "single_quoted_string" method | Igor Aleksanov | -11/+15 | |
| 2019-11-03 | librustc_lexer: Make "eat_float_exponent" return bool instead of result | Igor Aleksanov | -4/+6 | |
| 2019-11-03 | librustc_lexer: Introduce "eat_while" and "eat_identifier" methods | Igor Aleksanov | -22/+28 | |
| 2019-11-03 | librustc_lexer: Add methods "first" and "second" to the "Cursor" | Igor Aleksanov | -20/+30 | |
| 2019-10-27 | librustc_lexer: Enhance documentation | Igor Aleksanov | -24/+225 | |
| Apply review suggestions Apply review suggestions | ||||
| 2019-09-05 | fill metadata in rustc_lexer's Cargo.toml | Aleksey Kladov | -0/+6 | |
| We publish this to crates.io, so having non-empty meta is useful | ||||
| 2019-09-04 | flatten rustc_lexer::character_properties module | Aleksey Kladov | -65/+70 | |
| On the call site, `rustc_lexer::is_whitespace` reads much better than `character_properties::is_whitespace`. | ||||
| 2019-09-04 | remove XID and Pattern_White_Space unicode tables from libcore | Aleksey Kladov | -37/+34 | |
| They are only used by rustc_lexer, and are not needed elsewhere. So we move the relevant definitions into rustc_lexer (while the actual unicode data comes from the unicode-xid crate) and make the rest of the compiler use it. | ||||
| 2019-08-19 | remove composite tokens support from the lexer | Aleksey Kladov | -162/+14 | |
| 2019-08-14 | remove special handling of \r\n from the lexer | Aleksey Kladov | -38/+11 | |
| 2019-08-02 | librustc_lexer: Unconfigure tests during normal build | Vadim Petrochenkov | -280/+279 | |
| 2019-07-27 | Add comment | topecongiro | -0/+2 | |
| 2019-07-27 | Add lib section to rustc_lexer's Cargo.toml | topecongiro | -0/+4 | |
| 2019-07-23 | Rollup merge of #62869 - matklad:feature-gate, r=Mark-Simulacrum | Mark Rousskov | -2/+1 | |
| add rustc_private as a proper language feature gate At the moment, `rustc_private` as a (library) feature exists by accident: `char::is_xid_start`, `char::is_xid_continue` methods in libcore define it. cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/How.20to.20declare.20new.20langauge.20feature.3F I don't know if this is at all reasonable, but at least tests seem to pass locally. That probably means that we can remove/rename to something more resonable the feature in libcore in the next release? | ||||
| 2019-07-23 | Update src/librustc_lexer/src/lib.rs | Aleksey Kladov | -1/+1 | |
| Co-Authored-By: Ralf Jung <post@ralfj.de> | ||||
| 2019-07-22 | add rustc_private as a proper language feature gate | Aleksey Kladov | -1/+0 | |
| At the moment, `rustc_private` as a (library) feature exists by accident: `char::is_xid_start`, `char::is_xid_continue` methods in libcore define it. | ||||
| 2019-07-21 | move unescape module to rustc_lexer | Aleksey Kladov | -0/+603 | |
| 2019-07-20 | Introduce rustc_lexer | Aleksey Kladov | -0/+776 | |
| The idea here is to make a reusable library out of the existing rust-lexer, by separating out pure lexing and rustc-specific concerns, like spans, error reporting an interning. So, rustc_lexer operates directly on `&str`, produces simple tokens which are a pair of type-tag and a bit of original text, and does not report errors, instead storing them as flags on the token. | ||||
