@@ -1036,9 +1036,7 @@ namespace Sass {
10361036 {
10371037 // check if we have an empty list
10381038 // return the empty list as such
1039- if (peek_css<
1040- exactly<' ]' >
1041- >(position))
1039+ if (peek_css< list_terminator >(position))
10421040 {
10431041 // return an empty list (nothing to delay)
10441042 return SASS_MEMORY_NEW (List, pstate, 0 , SASS_SPACE, false , true );
@@ -1068,18 +1066,7 @@ namespace Sass {
10681066 while (lex_css< exactly<' ,' > >())
10691067 {
10701068 // check for abort condition
1071- if (peek_css< alternatives <
1072- exactly<' ;' >,
1073- exactly<' }' >,
1074- exactly<' {' >,
1075- exactly<' )' >,
1076- exactly<' ]' >,
1077- exactly<' :' >,
1078- end_of_file,
1079- exactly<ellipsis>,
1080- default_flag,
1081- global_flag
1082- > >(position)
1069+ if (peek_css< list_terminator >(position)
10831070 ) { break ; }
10841071 // otherwise add another expression
10851072 bracketed_list->append (parse_space_list ());
@@ -1101,19 +1088,7 @@ namespace Sass {
11011088 {
11021089 // check if we have an empty list
11031090 // return the empty list as such
1104- if (peek_css< alternatives <
1105- // exactly<'!'>,
1106- exactly<' ;' >,
1107- exactly<' }' >,
1108- exactly<' {' >,
1109- exactly<' )' >,
1110- exactly<' ]' >,
1111- exactly<' :' >,
1112- end_of_file,
1113- exactly<ellipsis>,
1114- default_flag,
1115- global_flag
1116- > >(position))
1091+ if (peek_css< list_terminator >(position))
11171092 {
11181093 // return an empty list (nothing to delay)
11191094 return SASS_MEMORY_NEW (List, pstate, 0 );
@@ -1137,18 +1112,7 @@ namespace Sass {
11371112 while (lex_css< exactly<' ,' > >())
11381113 {
11391114 // check for abort condition
1140- if (peek_css< alternatives <
1141- exactly<' ;' >,
1142- exactly<' }' >,
1143- exactly<' {' >,
1144- exactly<' )' >,
1145- exactly<' ]' >,
1146- exactly<' :' >,
1147- end_of_file,
1148- exactly<ellipsis>,
1149- default_flag,
1150- global_flag
1151- > >(position)
1115+ if (peek_css< list_terminator >(position)
11521116 ) { break ; }
11531117 // otherwise add another expression
11541118 comma_list->append (parse_space_list ());
@@ -1163,39 +1127,16 @@ namespace Sass {
11631127 {
11641128 Expression_Obj disj1 = parse_disjunction ();
11651129 // if it's a singleton, return it (don't wrap it)
1166- if (peek_css< alternatives <
1167- // exactly<'!'>,
1168- exactly<' ;' >,
1169- exactly<' }' >,
1170- exactly<' {' >,
1171- exactly<' )' >,
1172- exactly<' ]' >,
1173- exactly<' ,' >,
1174- exactly<' :' >,
1175- end_of_file,
1176- exactly<ellipsis>,
1177- default_flag,
1178- global_flag
1179- > >(position)
1180- ) { return disj1; }
1130+ if (peek_css< space_list_terminator >(position)
1131+ ) {
1132+ return disj1; }
11811133
11821134 List_Obj space_list = SASS_MEMORY_NEW (List, pstate, 2 , SASS_SPACE);
11831135 space_list->append (disj1);
11841136
1185- while (!(peek_css< alternatives <
1186- // exactly<'!'>,
1187- exactly<' ;' >,
1188- exactly<' }' >,
1189- exactly<' {' >,
1190- exactly<' )' >,
1191- exactly<' ]' >,
1192- exactly<' ,' >,
1193- exactly<' :' >,
1194- end_of_file,
1195- exactly<ellipsis>,
1196- default_flag,
1197- global_flag
1198- > >(position)) && peek_css< optional_css_whitespace >() != end
1137+ while (
1138+ !(peek_css< space_list_terminator >(position)) &&
1139+ peek_css< optional_css_whitespace >() != end
11991140 ) {
12001141 // the space is parsed implicitly?
12011142 space_list->append (parse_disjunction ());
0 commit comments