emit proper error for toplevel "
This commit is contained in:
parent
4cba3dfd4e
commit
2bd8232a00
@ -387,8 +387,9 @@ pub(crate) fn eat_expr<I: Iterator<Item = Token>>(
|
||||
}
|
||||
}
|
||||
'\\' => {
|
||||
values.push(toks.next().unwrap());
|
||||
values.push(toks.next().unwrap());
|
||||
let next = toks.next().unwrap();
|
||||
values.push(next);
|
||||
values.push(toks.next().ok_or(("expected \"}\".", next.pos))?);
|
||||
}
|
||||
// todo: this should only apply to special functions
|
||||
// it is causing us to emit nothing on malformed input
|
||||
|
@ -123,6 +123,7 @@ error!(
|
||||
"#{", "Error: expected \"}\"."
|
||||
);
|
||||
error!(toplevel_hash, "#", "Error: expected \"{\".");
|
||||
error!(toplevel_backslash, "\\", "Error: expected \"}\".");
|
||||
error!(toplevel_var_no_colon, "$r", "Error: expected \":\".");
|
||||
error!(bar_in_value, "a {color: a|b;}", "Error: expected \";\".");
|
||||
error!(
|
||||
|
Loading…
x
Reference in New Issue
Block a user