@@ -1036,9 +1036,7 @@ namespace Sass {
1036
1036
{
1037
1037
// check if we have an empty list
1038
1038
// return the empty list as such
1039
- if (peek_css<
1040
- exactly<' ]' >
1041
- >(position))
1039
+ if (peek_css< list_terminator >(position))
1042
1040
{
1043
1041
// return an empty list (nothing to delay)
1044
1042
return SASS_MEMORY_NEW (List, pstate, 0 , SASS_SPACE, false , true );
@@ -1068,18 +1066,7 @@ namespace Sass {
1068
1066
while (lex_css< exactly<' ,' > >())
1069
1067
{
1070
1068
// 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)
1083
1070
) { break ; }
1084
1071
// otherwise add another expression
1085
1072
bracketed_list->append (parse_space_list ());
@@ -1101,19 +1088,7 @@ namespace Sass {
1101
1088
{
1102
1089
// check if we have an empty list
1103
1090
// 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))
1117
1092
{
1118
1093
// return an empty list (nothing to delay)
1119
1094
return SASS_MEMORY_NEW (List, pstate, 0 );
@@ -1137,18 +1112,7 @@ namespace Sass {
1137
1112
while (lex_css< exactly<' ,' > >())
1138
1113
{
1139
1114
// 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)
1152
1116
) { break ; }
1153
1117
// otherwise add another expression
1154
1118
comma_list->append (parse_space_list ());
@@ -1163,39 +1127,16 @@ namespace Sass {
1163
1127
{
1164
1128
Expression_Obj disj1 = parse_disjunction ();
1165
1129
// 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; }
1181
1133
1182
1134
List_Obj space_list = SASS_MEMORY_NEW (List, pstate, 2 , SASS_SPACE);
1183
1135
space_list->append (disj1);
1184
1136
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
1199
1140
) {
1200
1141
// the space is parsed implicitly?
1201
1142
space_list->append (parse_disjunction ());
0 commit comments