From 87b03e91c9dcb6686c4de68387272f2354eb7894 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Thu, 2 Apr 2020 02:03:15 -0400 Subject: [PATCH] error message for unopened close paren in value --- src/value/parse.rs | 2 +- tests/error.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/value/parse.rs b/src/value/parse.rs index 521ff97..ed75f44 100644 --- a/src/value/parse.rs +++ b/src/value/parse.rs @@ -606,7 +606,7 @@ impl Value { Ok(IntermediateValue::Op(Op::Div)) } } - ':' | '?' => Err("expected \";\".".into()), + ':' | '?' | ')' => Err("expected \";\".".into()), v if v.is_control() => Err("Expected expression.".into()), v => { dbg!(v); diff --git a/tests/error.rs b/tests/error.rs index 17e47a9..328c5e4 100644 --- a/tests/error.rs +++ b/tests/error.rs @@ -36,3 +36,7 @@ error!( backslash_as_last_character, "a {colo\\: red;}", "Error: expected \"{\"." ); +error!( + close_paren_without_opening, + "a {color: foo);}", "Error: expected \";\"." +);