resolve todo!()
on malformed @use
missing string
This commit is contained in:
parent
10e08fc8ec
commit
849a8b4414
@ -186,7 +186,9 @@ impl<'a> Parser<'a> {
|
||||
|
||||
let quote = match self.toks.next() {
|
||||
Some(Token { kind: q @ '"', .. }) | Some(Token { kind: q @ '\'', .. }) => q,
|
||||
Some(..) | None => todo!(),
|
||||
Some(..) | None => {
|
||||
return Err(("Expected string.", self.span_before).into())
|
||||
}
|
||||
};
|
||||
|
||||
let Spanned { node: module, span } = self.parse_quoted_string(quote)?;
|
||||
|
@ -38,6 +38,10 @@ error!(
|
||||
module_function_missing_open_parens,
|
||||
"@use \"sass:math\";\na { color: math.floor; }", "Error: expected \"(\"."
|
||||
);
|
||||
error!(
|
||||
module_not_quoted_string,
|
||||
"@use a", "Error: Expected string."
|
||||
);
|
||||
test!(
|
||||
use_as,
|
||||
"@use \"sass:math\" as foo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user