diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-17 23:38:04 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-17 23:38:04 +0100 |
commit | 63956e509eea1aba1a303c58bf60d068863a61dd (patch) | |
tree | c696fba1395b93b357e543e0cd69bbe4977f3889 /xtask/src/ast_src.rs | |
parent | 783c6a333acc3c05839f8c4bfa3174665a32abc6 (diff) | |
parent | c2335d0cb2aee42ae70e94c005cdb5d2ae418cd1 (diff) |
Merge #6248
6248: Textmate grammar: prevent early termination of raw strings with hash (closes #6042) r=matklad a=dustypomerleau
Problematic sample code from #6042:
```rust
#[derive(Debug, Clone, Logos)]
enum Quoted<'source> {
#[regex(r#"[^\\"']+"#)]
Text(&'source str),
#[token("\\")]
StartEscape,
#[token("\'", |_| Quote::Single)]
#[token("\"", |_| Quote::Double)]
End(Quote),
#[error]
Error,
}
```
Before fix:
<img width="400" alt="Screen Shot 2020-10-16 at 10 45 59" src="https://user-images.githubusercontent.com/6304651/96198390-6a726d00-0fa0-11eb-8428-e76b2866836b.png">
After fix:
<img width="400" alt="Screen Shot 2020-10-16 at 10 45 33" src="https://user-images.githubusercontent.com/6304651/96198408-7a8a4c80-0fa0-11eb-9104-ca708009fe63.png">
Co-authored-by: Dusty Pomerleau <[email protected]>
Diffstat (limited to 'xtask/src/ast_src.rs')
0 files changed, 0 insertions, 0 deletions