handle arbitrary parens in function calls

This commit is contained in:
ConnorSkees 2020-03-30 15:07:06 -04:00
parent 08dcf0fae7
commit 206c3f8179
2 changed files with 7 additions and 2 deletions

View File

@ -213,7 +213,7 @@ fn read_until_close_paren<I: Iterator<Item = Token>>(toks: &mut Peekable<I>) ->
for tok in toks {
match tok.kind {
')' => {
if scope <= 1 {
if scope < 1 {
v.push(tok);
return v;
} else {

View File

@ -88,6 +88,11 @@ test!(
"a {\n color: -a -b -c;\n}\n"
);
test!(
alllows_escaped_quote_at_start_of_ident,
allows_escaped_quote_at_start_of_ident,
"a {\n color: \\\"c\\\";\n}\n"
);
test!(
args_handles_arbitrary_number_of_parens,
"a {\n color: inspect((((((a))))));\n}\n",
"a {\n color: a;\n}\n"
);