Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
compilerlib: Report failure on unterminated escape sequence
Co-authored-by: Olivier Goffart <olivier@woboq.com>
  • Loading branch information
hunger and ogoffart committed Nov 19, 2021
1 parent 46f291e commit a488a79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sixtyfps_compiler/lexer.rs
Expand Up @@ -125,7 +125,8 @@ pub fn lex_string(text: &str, state: &mut LexState) -> usize {
}
b'\\' => {
if text_len <= stop + 1 {
return text_len;
// FIXME: report an error for unterminated string
return 0;
}
if text.as_bytes()[stop + 1] == b'{' {
state.template_string_stack.push(0);
Expand Down

0 comments on commit a488a79

Please sign in to comment.