handle case when there is no input after escape

This commit is contained in:
ConnorSkees 2020-05-24 09:20:55 -04:00
parent 096abb6ca0
commit b653c55ad7
2 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,7 @@ pub(crate) fn read_until_open_curly_brace<I: Iterator<Item = Token>>(
if toks.peek().is_some() { if toks.peek().is_some() {
t.push(toks.next().unwrap()); t.push(toks.next().unwrap());
} }
continue;
} }
_ => {} _ => {}
} }

View File

@ -122,3 +122,7 @@ error!(
condition_is_evaluated_eagerly, condition_is_evaluated_eagerly,
"@if 1 + 1 =s {\n}", "Error: expected \"=\"." "@if 1 + 1 =s {\n}", "Error: expected \"=\"."
); );
error!(
nothing_after_escape,
"@if \\", "Error: Expected expression."
);