remove panic for missing equal
This commit is contained in:
parent
bc12c0b4e7
commit
a3548b0044
@ -858,7 +858,7 @@ impl Value {
|
||||
}
|
||||
'=' => {
|
||||
let mut span = toks.next().unwrap().pos();
|
||||
if let Token { kind: '=', pos } = toks.next().unwrap() {
|
||||
if let Some(Token { kind: '=', pos }) = toks.next() {
|
||||
span = span.merge(pos);
|
||||
IntermediateValue::Op(Op::Equal).span(span)
|
||||
} else {
|
||||
|
@ -167,3 +167,7 @@ error!(
|
||||
operator_mul,
|
||||
"a {color: 5 - *;}", "Error: Expected expression."
|
||||
);
|
||||
error!(
|
||||
ends_with_single_eq,
|
||||
"a {color: 1 =", "Error: expected \"=\"."
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user