From 0c144e22ba1c9e0163ffd868d3af314654c6aa4b Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Thu, 21 May 2020 01:07:34 -0400 Subject: [PATCH] handle ` in values --- 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 5d2a8f8..e7ef9e4 100644 --- a/src/value/parse.rs +++ b/src/value/parse.rs @@ -901,7 +901,7 @@ impl Value { } ';' | '}' | '{' => return None, ':' | '?' | ')' | '@' | '^' | ']' => return Some(Err(("expected \";\".", span).into())), - v if v as u32 >= 0x80 || v.is_control() => { + v if v as u32 >= 0x80 || v.is_control() || v == '`' => { return Some(Err(("Expected expression.", span).into())) } v => todo!("unexpected token in value parsing: {:?}", v), diff --git a/tests/error.rs b/tests/error.rs index c5732d1..4256563 100644 --- a/tests/error.rs +++ b/tests/error.rs @@ -94,3 +94,7 @@ error!( toplevel_backtick, "` {}", "Error: expected selector." ); +error!( + backtick_in_value, + "a {color:`red;}", "Error: Expected expression." +);