Fix crash encountering --
This commit is contained in:
parent
3af2292d5b
commit
c95ecc0825
@ -59,6 +59,7 @@ impl<'a> Iterator for Lexer<'a> {
|
|||||||
s.push_str(&kw.to_string());
|
s.push_str(&kw.to_string());
|
||||||
TokenKind::Ident(s)
|
TokenKind::Ident(s)
|
||||||
}
|
}
|
||||||
|
TokenKind::Symbol(Symbol::Minus) => TokenKind::Ident(String::from("--")),
|
||||||
_ => unsafe { std::hint::unreachable_unchecked() },
|
_ => unsafe { std::hint::unreachable_unchecked() },
|
||||||
},
|
},
|
||||||
_ => TokenKind::Symbol(Symbol::Minus),
|
_ => TokenKind::Symbol(Symbol::Minus),
|
||||||
|
@ -18,3 +18,8 @@ test!(
|
|||||||
"a {\n color: a#{foo}1;\n}\n",
|
"a {\n color: a#{foo}1;\n}\n",
|
||||||
"a {\n color: afoo1;\n}\n"
|
"a {\n color: afoo1;\n}\n"
|
||||||
);
|
);
|
||||||
|
test!(
|
||||||
|
double_hyphen_before_interpolation,
|
||||||
|
"a {\n --#{foo}: red;\n}\n",
|
||||||
|
"a {\n --foo: red;\n}\n"
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user