symbol after hash in value
This commit is contained in:
parent
87b03e91c9
commit
618fa9ed86
@ -368,7 +368,7 @@ pub(crate) fn eat_ident<I: Iterator<Item = Token>>(
|
||||
match tok.kind {
|
||||
'#' => {
|
||||
toks.next();
|
||||
if toks.peek().unwrap().kind == '{' {
|
||||
if toks.peek().ok_or("Expected identifier.")?.kind == '{' {
|
||||
toks.next();
|
||||
s.push_str(&parse_interpolation(toks, scope, super_selector)?.to_string());
|
||||
} else {
|
||||
|
@ -31,7 +31,12 @@ fn parse_hex<I: Iterator<Item = Token>>(
|
||||
super_selector: &Selector,
|
||||
) -> SassResult<Value> {
|
||||
let mut s = String::with_capacity(8);
|
||||
if toks.peek().unwrap().kind.is_ascii_digit() {
|
||||
if toks
|
||||
.peek()
|
||||
.ok_or("Expected identifier.")?
|
||||
.kind
|
||||
.is_ascii_digit()
|
||||
{
|
||||
while let Some(c) = toks.peek() {
|
||||
if !c.kind.is_ascii_hexdigit() || s.len() == 8 {
|
||||
break;
|
||||
|
@ -40,3 +40,7 @@ error!(
|
||||
close_paren_without_opening,
|
||||
"a {color: foo);}", "Error: expected \";\"."
|
||||
);
|
||||
error!(
|
||||
symbol_after_hash,
|
||||
"a {color: bar + #}ar;}", "Error: Expected identifier."
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user