resolve todo!()
inside malformed module fn call
This commit is contained in:
parent
b771befed4
commit
7358eb16dc
@ -40,7 +40,12 @@ impl<'a> Iterator for Lexer<'a> {
|
||||
impl<'a> Lexer<'a> {
|
||||
pub fn new(file: &'a Arc<File>) -> Lexer<'a> {
|
||||
Lexer {
|
||||
buf: file.source().trim_start_matches("\u{ef}\u{bb}\u{bf}").trim_start_matches("\u{feff}").chars().peekable(),
|
||||
buf: file
|
||||
.source()
|
||||
.trim_start_matches("\u{ef}\u{bb}\u{bf}")
|
||||
.trim_start_matches("\u{feff}")
|
||||
.chars()
|
||||
.peekable(),
|
||||
pos: 0,
|
||||
file,
|
||||
}
|
||||
|
@ -220,9 +220,7 @@ impl<'a> Parser<'a> {
|
||||
.get_fn(fn_name)?
|
||||
.ok_or(("Undefined function.", fn_name.span))?;
|
||||
|
||||
if !matches!(self.toks.next(), Some(Token { kind: '(', .. })) {
|
||||
todo!()
|
||||
}
|
||||
self.expect_char('(')?;
|
||||
|
||||
let call_args = self.parse_call_args()?;
|
||||
|
||||
|
@ -34,6 +34,10 @@ error!(
|
||||
unknown_function,
|
||||
"@use \"sass:math\";\na { color: math.bar(); }", "Error: Undefined function."
|
||||
);
|
||||
error!(
|
||||
module_function_missing_open_parens,
|
||||
"@use \"sass:math\";\na { color: math.floor; }", "Error: expected \"(\"."
|
||||
);
|
||||
test!(
|
||||
use_as,
|
||||
"@use \"sass:math\" as foo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user