Skip to content

Commit bbd7fef

Browse files
committed
Improve block comment parsing for lists
Fixes #1082
1 parent e60ad9a commit bbd7fef

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

parser.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ namespace Sass {
10511051

10521052
Expression* Parser::parse_comma_list()
10531053
{
1054-
if (peek< alternatives <
1054+
if (peek_css< alternatives <
10551055
// exactly<'!'>,
10561056
// exactly<':'>,
10571057
exactly<';'>,
@@ -1063,14 +1063,14 @@ namespace Sass {
10631063
{ return new (ctx.mem) List(pstate, 0); }
10641064
Expression* list1 = parse_space_list();
10651065
// if it's a singleton, return it directly; don't wrap it
1066-
if (!peek< exactly<','> >(position)) return list1;
1066+
if (!peek_css< exactly<','> >(position)) return list1;
10671067

10681068
List* comma_list = new (ctx.mem) List(pstate, 2, List::COMMA);
10691069
(*comma_list) << list1;
10701070

1071-
while (lex< exactly<','> >())
1071+
while (lex_css< exactly<','> >())
10721072
{
1073-
if (peek< alternatives <
1073+
if (peek_css< alternatives <
10741074
// exactly<'!'>,
10751075
exactly<';'>,
10761076
exactly<'}'>,
@@ -1091,7 +1091,7 @@ namespace Sass {
10911091
{
10921092
Expression* disj1 = parse_disjunction();
10931093
// if it's a singleton, return it directly; don't wrap it
1094-
if (peek< alternatives <
1094+
if (peek_css< alternatives <
10951095
// exactly<'!'>,
10961096
exactly<';'>,
10971097
exactly<'}'>,
@@ -1108,7 +1108,7 @@ namespace Sass {
11081108
List* space_list = new (ctx.mem) List(pstate, 2, List::SPACE);
11091109
(*space_list) << disj1;
11101110

1111-
while (!(peek< alternatives <
1111+
while (!(peek_css< alternatives <
11121112
// exactly<'!'>,
11131113
exactly<';'>,
11141114
exactly<'}'>,
@@ -1229,9 +1229,9 @@ namespace Sass {
12291229

12301230
Expression* Parser::parse_factor()
12311231
{
1232-
if (lex< exactly<'('> >()) {
1232+
if (lex_css< exactly<'('> >()) {
12331233
Expression* value = parse_map();
1234-
if (!lex< exactly<')'> >()) error("unclosed parenthesis", pstate);
1234+
if (!lex_css< exactly<')'> >()) error("unclosed parenthesis", pstate);
12351235
value->is_delayed(false);
12361236
// make sure wrapped lists and division expressions are non-delayed within parentheses
12371237
if (value->concrete_type() == Expression::LIST) {

0 commit comments

Comments
 (0)