mirror of
https://github.com/danog/dart-sass.git
synced 2024-12-04 02:27:47 +01:00
Allow functions named after constants.
This commit is contained in:
parent
c8f0126f0b
commit
794bdee476
@ -1526,6 +1526,8 @@ abstract class StylesheetParser extends Parser {
|
||||
var identifier = _interpolatedIdentifier();
|
||||
var plain = identifier.asPlain;
|
||||
if (plain != null) {
|
||||
var lower = plain.toLowerCase();
|
||||
if (scanner.peekChar() != $lparen) {
|
||||
switch (plain) {
|
||||
case "false":
|
||||
return new BooleanExpression(false, identifier.span);
|
||||
@ -1543,9 +1545,9 @@ abstract class StylesheetParser extends Parser {
|
||||
return new BooleanExpression(true, identifier.span);
|
||||
}
|
||||
|
||||
var lower = plain.toLowerCase();
|
||||
var color = colorsByName[lower];
|
||||
if (color != null) return new ColorExpression(color, identifier.span);
|
||||
}
|
||||
|
||||
var specialFunction = _trySpecialFunction(lower, start);
|
||||
if (specialFunction != null) return specialFunction;
|
||||
|
Loading…
Reference in New Issue
Block a user