edge case in which @ include had no args AND no semicolon
This commit is contained in:
parent
223dade62b
commit
dcdd2a1cb1
@ -199,11 +199,16 @@ pub(crate) fn eat_include<I: Iterator<Item = Token>>(
|
|||||||
'(' => {
|
'(' => {
|
||||||
let tmp = eat_call_args(toks)?;
|
let tmp = eat_call_args(toks)?;
|
||||||
devour_whitespace_or_comment(toks)?;
|
devour_whitespace_or_comment(toks)?;
|
||||||
if let Some(tok) = toks.next() {
|
if let Some(tok) = toks.peek() {
|
||||||
match tok.kind {
|
match tok.kind {
|
||||||
';' => {}
|
';' => {
|
||||||
'{' => has_content = true,
|
toks.next();
|
||||||
_ => todo!(),
|
}
|
||||||
|
'{' => {
|
||||||
|
toks.next();
|
||||||
|
has_content = true
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tmp
|
tmp
|
||||||
|
@ -233,3 +233,8 @@ error!(
|
|||||||
undefined_mixin,
|
undefined_mixin,
|
||||||
"a {@include foo;}", "Error: Undefined mixin."
|
"a {@include foo;}", "Error: Undefined mixin."
|
||||||
);
|
);
|
||||||
|
test!(
|
||||||
|
include_empty_args_no_semicolon,
|
||||||
|
"@mixin c {}\n\na {\n @include c()\n}\n",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user