summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/syntax
AgeCommit message (Collapse)AuthorLines
2024-03-10Merge commit '574e23ec508064613783cba3d1833a95fd9a5080' into sync-from-raLaurențiu Nicola-30/+35
2024-03-03Merge commit '4ef6a49b44e8aa380da7522442234bfd7a52c55e' into sync-from-raLaurențiu Nicola-3/+11
2024-02-18Merge commit 'ac998a74b3c8ff4b81c3eeb9a18811d4cc76226d' into sync-from-raLaurențiu Nicola-26/+88
2024-02-11Merge commit 'ddf105b646c6749a2de2451c9a499a354eec79c2' into sync-from-raLaurențiu Nicola-36/+89
2024-02-04Merge commit '0113bc9388b480fa42c632f57f4f0f7af5813ec1' into sync-from-raLaurențiu Nicola-23/+27
2024-01-28Merge commit '7219414e81810fd4d967136c4a0650523892c157' into sync-from-raLaurențiu Nicola-12/+12
2024-01-25Rename the unescaping functions.Nicholas Nethercote-12/+12
`unescape_literal` becomes `unescape_unicode`, and `unescape_c_string` becomes `unescape_mixed`. Because rfc3349 will mean that C string literals will no longer be the only mixed utf8 literals.
2024-01-25Rework `CStrUnit`.Nicholas Nethercote-5/+4
- Rename it as `MixedUnit`, because it will soon be used in more than just C string literals. - Change the `Byte` variant to `HighByte` and use it only for `\x80`..`\xff` cases. This fixes the old inexactness where ASCII chars could be encoded with either `Byte` or `Char`. - Add useful comments. - Remove `is_ascii`, in favour of `u8::is_ascii`.
2024-01-25Fix copy/paste error.Nicholas Nethercote-2/+2
The `CString` handling code is erroneously identical to the `ByteString` handling code.
2024-01-21Merge commit 'a9116523604c998e7781f60d3b5a6f586e0414a9' into sync-from-raLaurențiu Nicola-48/+104
2024-01-18Rollup merge of #119172 - nnethercote:earlier-NulInCStr, r=petrochenkovMatthias Krüger-0/+3
Detect `NulInCStr` error earlier. By making it an `EscapeError` instead of a `LitError`. This makes it like the other errors produced when checking string literals contents, e.g. for invalid escape sequences or bare CR chars. NOTE: this means these errors are issued earlier, before expansion, which changes behaviour. It will be possible to move the check back to the later point if desired. If that happens, it's likely that all the string literal contents checks will be delayed together. One nice thing about this: the old approach had some code in `report_lit_error` to calculate the span of the nul char from a range. This code used a hardwired `+2` to account for the `c"` at the start of a C string literal, but this should have changed to a `+3` for raw C string literals to account for the `cr"`, which meant that the caret in `cr"` nul error messages was one short of where it should have been. The new approach doesn't need any of this and avoids the off-by-one error. r? ```@fee1-dead```
2024-01-15Merge commit '9d8889cdfcc3aa0302353fc988ed21ff9bc9925c' into sync-from-raLaurențiu Nicola-17/+18
2024-01-12Detect `NulInCStr` error earlier.Nicholas Nethercote-0/+3
By making it an `EscapeError` instead of a `LitError`. This makes it like the other errors produced when checking string literals contents, e.g. for invalid escape sequences or bare CR chars. NOTE: this means these errors are issued earlier, before expansion, which changes behaviour. It will be possible to move the check back to the later point if desired. If that happens, it's likely that all the string literal contents checks will be delayed together. One nice thing about this: the old approach had some code in `report_lit_error` to calculate the span of the nul char from a range. This code used a hardwired `+2` to account for the `c"` at the start of a C string literal, but this should have changed to a `+3` for raw C string literals to account for the `cr"`, which meant that the caret in `cr"` nul error messages was one short of where it should have been. The new approach doesn't need any of this and avoids the off-by-one error.
2024-01-08Merge commit 'af40101841c45aa75b56f4e9ca745369da8fb4ba' into sync-from-raLaurențiu Nicola-19/+59
2024-01-03Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2Laurențiu Nicola-33/+130
2023-12-18Merge commit '21b06c1beb9bb59369ffd652f5d617bcf6952e05' into sync-from-raLaurențiu Nicola-44/+14
2023-12-11Merge commit '457b966b171b09a7e57acb710fbca29a4b3526f0' into sync-from-raLaurențiu Nicola-25/+55
2023-11-16Merge commit '141fc695dca1df7cfc3c9803972ec19bb178dcbc' into sync-from-raLaurențiu Nicola-57/+241
2023-11-08Merge commit '3b7c7f97e4a7bb253a8d398ee4f8346f6cf2817b' into sync-from-raLaurențiu Nicola-37/+93
2023-10-22use visibility to check unused imports and delete some stmtsbohan-1/+0
2023-09-18Merge commit '258b15c506a2d3ad862fd17ae24eaf272443f477' into sync-from-raLaurențiu Nicola-50/+199
2023-08-21Merge commit '9b3d03408c66749d56466bb09baf2a7177deb6ce' into sync-from-raLaurențiu Nicola-6/+25
2023-08-07Merge commit 'baee6b338b0ea076cd7a9f18d47f175dd2ba0e5d' into sync-from-raLaurențiu Nicola-2/+75
2023-07-24Merge commit '99718d0c8bc5aadd993acdcabc1778fc7b5cc572' into sync-from-raLaurențiu Nicola-14/+47
2023-07-17Merge commit '37f84c101bca43b11027f30ab0c2852f9325bc3d' into sync-from-raLaurențiu Nicola-7/+240
2023-06-19Merge commit 'cd3bf9fe51676b520c546460e6d8919b8c8ff99f' into sync-from-raLaurențiu Nicola-5/+5
2023-06-05Merge commit 'aa9bc8612514d216f84eec218dfd19ab83f3598a' into sync-from-raLaurențiu Nicola-68/+313
2023-03-20:arrow_up: rust-analyzerLaurențiu Nicola-20/+29
2023-03-13:arrow_up: rust-analyzerLaurențiu Nicola-8/+139
2023-02-20:arrow_up: rust-analyzerLaurențiu Nicola-1/+1
2023-02-13:arrow_up: rust-analyzerLaurențiu Nicola-22/+73
2023-01-09:arrow_up: rust-analyzerarcnmx-58/+442
Merge commit '368e0bb32f1178cf162c2ce5f7e10b7ae211eb26'
2022-11-23:arrow_up: rust-analyzerLaurențiu Nicola-11/+50
2022-11-09Rollup merge of #104211 - lnicola:rust-analyzer-2022-11-09, r=lnicolaMichael Goulet-0/+20
:arrow_up: rust-analyzer r? ``@ghost``
2022-11-09:arrow_up: rust-analyzerLaurențiu Nicola-0/+20
2022-11-09Rollup merge of #103919 - nnethercote:unescaping-cleanups, r=matkladDylan DPC-4/+2
Unescaping cleanups Some code improvements, and some error message improvements. Best reviewed one commit at a time. r? ````@matklad````
2022-11-05Remove `unescape_byte_literal`.Nicholas Nethercote-4/+2
It's easy to just use `unescape_literal` + `byte_from_char`.
2022-11-01:arrow_up: rust-analyzerLaurențiu Nicola-28/+28
2022-10-26:arrow_up: rust-analyzerLaurențiu Nicola-4/+3
2022-10-18:arrow_up: rust-analyzerLaurențiu Nicola-9/+78
2022-10-11:arrow_up: rust-analyzerLaurențiu Nicola-0/+30
2022-09-13:arrow_up: rust-analyzerLaurențiu Nicola-8/+14
2022-09-06:arrow_up: rust-analyzerLaurențiu Nicola-332/+395
2022-08-23:arrow_up: rust-analyzerLaurențiu Nicola-1/+1
2022-08-16:arrow_up: rust-analyzerLaurențiu Nicola-5/+2
2022-08-09:arrow_up: rust-analyzerLaurențiu Nicola-29/+149
2022-08-02:arrow_up: rust-analyzerLaurențiu Nicola-4/+40
2022-07-24Fix .gitattributes for test_dataAmos Wenger-223/+223
2022-07-24Move cfg attrs up to the mod definitions to disable sourcegenAmos Wenger-7/+1
2022-07-24Disable all source-gen tests at compile timeAmos Wenger-1/+12