handle ` in values

This commit is contained in:
ConnorSkees 2020-05-21 01:07:34 -04:00
parent a63e139cd8
commit 0c144e22ba
2 changed files with 5 additions and 1 deletions

View File

@ -901,7 +901,7 @@ impl Value {
} }
';' | '}' | '{' => return None, ';' | '}' | '{' => return None,
':' | '?' | ')' | '@' | '^' | ']' => return Some(Err(("expected \";\".", span).into())), ':' | '?' | ')' | '@' | '^' | ']' => 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())) return Some(Err(("Expected expression.", span).into()))
} }
v => todo!("unexpected token in value parsing: {:?}", v), v => todo!("unexpected token in value parsing: {:?}", v),

View File

@ -94,3 +94,7 @@ error!(
toplevel_backtick, toplevel_backtick,
"` {}", "Error: expected selector." "` {}", "Error: expected selector."
); );
error!(
backtick_in_value,
"a {color:`red;}", "Error: Expected expression."
);