Warn when an escaped newline skips multiple lines

This commit is contained in:
Anton Golov 2021-07-31 20:35:37 +02:00
parent d488de82f3
commit a03fbfe2ff
3 changed files with 19 additions and 0 deletions

View file

@ -280,6 +280,11 @@ pub(crate) fn emit_unescape_error(
format!("non-ASCII whitespace symbol '{}' is not skipped", c.escape_unicode());
handler.struct_span_warn(span, &msg).span_label(char_span, &msg).emit();
}
EscapeError::MultipleSkippedLinesWarning => {
let msg = "multiple lines skipped by escaped newline";
let bottom_msg = "skipping everything up to and including this point";
handler.struct_span_warn(span, msg).span_label(span, bottom_msg).emit();
}
}
}