mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Graccefully handle overflowing unicode literals
This commit is contained in:
parent
a83f44188b
commit
6ef87b3b9d
11 changed files with 106 additions and 27 deletions
|
@ -295,7 +295,7 @@ pub fn parse_str_like_literal<'a>() -> impl Parser<'a, StrLikeLiteral<'a>, EStri
|
|||
// -> TODO: do we want to change this?
|
||||
|
||||
// Simply by decoding this, it's guaranteed to be valid utf-8
|
||||
let text = expr.to_str_in(arena);
|
||||
let text = expr.to_str_in(arena).map_err(|e| (MadeProgress, e))?;
|
||||
|
||||
if text.len() > 5 {
|
||||
return Err((
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue