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();
|
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);
|
span = span.merge(pos);
|
||||||
IntermediateValue::Op(Op::Equal).span(span)
|
IntermediateValue::Op(Op::Equal).span(span)
|
||||||
} else {
|
} else {
|
||||||
|
@ -167,3 +167,7 @@ error!(
|
|||||||
operator_mul,
|
operator_mul,
|
||||||
"a {color: 5 - *;}", "Error: Expected expression."
|
"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