Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 691e101

Browse files
committed
Extends special IE parsing for expressions
1 parent 4761a56 commit 691e101

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

constants.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ namespace Sass {
6666
extern const char even_kwd[] = "even";
6767
extern const char odd_kwd[] = "odd";
6868
extern const char progid_kwd[] = "progid";
69+
extern const char expression_kwd[] = "expression";
6970
extern const char calc_kwd[] = "calc(";
7071

7172
// css attribute-matching operators

constants.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ namespace Sass {
6666
extern const char even_kwd[];
6767
extern const char odd_kwd[];
6868
extern const char progid_kwd[];
69+
extern const char expression_kwd[];
6970
extern const char calc_kwd[];
7071

7172
// css attribute-matching operators

prelexer.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,13 +426,16 @@ namespace Sass {
426426
return exactly<lte>(src);
427427
}
428428

429-
// match the IE syntax
430-
const char* progid(const char* src) {
431-
return exactly<progid_kwd>(src);
429+
// match specific IE syntax
430+
const char* ie_progid(const char* src) {
431+
return sequence < exactly<progid_kwd>, exactly<':'>, alternatives< identifier_schema, identifier >, one_plus< sequence< exactly<'.'>, alternatives< identifier_schema, identifier > > > >(src);
432432
}
433-
433+
const char* ie_expression(const char* src) {
434+
return exactly<expression_kwd>(src);
435+
}
436+
// match any IE syntax
434437
const char* ie_stuff(const char* src) {
435-
return sequence< progid, exactly<':'>, alternatives< identifier_schema, identifier >, one_plus< sequence< exactly<'.'>, alternatives< identifier_schema, identifier > > >, delimited_by<'(', ';', true> >(src);
438+
return sequence< alternatives < ie_expression, ie_progid >, delimited_by<'(', ';', true> >(src);
436439
}
437440

438441
// const char* ie_args(const char* src) {

0 commit comments

Comments
 (0)