lexer: lowercase-only delimiters for quoted strings#13628
lexer: lowercase-only delimiters for quoted strings#13628Octachron merged 4 commits intoocaml:trunkfrom
Conversation
|
Naive questions:
|
let identchar = ['A'-'Z' 'a'-'z' '_' '\'' '0'-'9']
let identstart_ext = identstart | utf8
let identchar_ext = identchar | utf8
let identstart = lowercase | uppercase
let ident_ext = identstart_ext identchar_ext*compared to the new let delim_ext = ( lowercase | uppercase | utf_8 ) *(where |
2ee9ede to
0e0a562
Compare
|
Note to self: in the diff from 5.2, the |
gasche
left a comment
There was a problem hiding this comment.
Thanks for the extra comments. I think that I now understand the change and agree that it is safe -- the set of quoted string delimiters of the PR is closer to the one of 5.2, so there are less risks of regressions similar to #13626.
| let utf8 = ['\192'-'\255'] ['\128'-'\191']* | ||
| let identstart_ext = identstart | utf8 | ||
| let identchar_ext = identchar | utf8 | ||
| let delim_ext = (lowercase | uppercase | utf8)* |
There was a problem hiding this comment.
Maybe you could have a comment on the fact that uppercase is in fact rejected by the validate_delim check, we intentionally accept more to provide clearer / more specific error messages?
There was a problem hiding this comment.
I have added an error message to point out that we want the same error message for {A| and {À|.
|
Looks good to me. By default I assume that you will merge and cherry-pick in 5.3. |
|
Indeed. |
* lexer: lowercase-only delimiters for quoted strings
* lexer: allow {%ext | |}
(cherry picked from commit 75a518d)
|
Cherry-picked on 5.3 as 66b424d . |
This PR fixes #13626 by limiting quoted string delimiters to alphabetical lowercase identifiers (
straßebut notx1norx').