mirror of
https://github.com/danog/dart-sass.git
synced 2024-12-02 17:49:38 +01:00
Fix parsing of binary -.
This commit is contained in:
parent
5791e1425a
commit
0f6f44f939
@ -967,6 +967,7 @@ abstract class StylesheetParser extends Parser {
|
|||||||
} else if (_lookingAtInterpolatedIdentifier()) {
|
} else if (_lookingAtInterpolatedIdentifier()) {
|
||||||
addSingleExpression(_identifierLike());
|
addSingleExpression(_identifierLike());
|
||||||
} else {
|
} else {
|
||||||
|
scanner.readChar();
|
||||||
addOperator(BinaryOperator.minus);
|
addOperator(BinaryOperator.minus);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1415,7 +1416,7 @@ abstract class StylesheetParser extends Parser {
|
|||||||
|
|
||||||
while (isDigit(scanner.peekChar())) {
|
while (isDigit(scanner.peekChar())) {
|
||||||
number *= 10;
|
number *= 10;
|
||||||
number += scanner.readChar() - $0;
|
number += asDecimal(scanner.readChar());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scanner.peekChar() == $dot) {
|
if (scanner.peekChar() == $dot) {
|
||||||
@ -1424,7 +1425,7 @@ abstract class StylesheetParser extends Parser {
|
|||||||
|
|
||||||
var decimal = 0.1;
|
var decimal = 0.1;
|
||||||
while (isDigit(scanner.peekChar())) {
|
while (isDigit(scanner.peekChar())) {
|
||||||
number += (scanner.readChar() - $0) * decimal;
|
number += asDecimal(scanner.readChar()) * decimal;
|
||||||
decimal /= 10;
|
decimal /= 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user