mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Additional change to 0b84213
This commit is contained in:
parent
536bde48d1
commit
0d8e8acf8a
@ -607,7 +607,12 @@ Token GetNextToken(Lexer& lexer)
|
|||||||
if (lexer.charType == CharType::MinusSymbol)
|
if (lexer.charType == CharType::MinusSymbol)
|
||||||
{
|
{
|
||||||
// If the - sign follows a symbol, it is treated as a (negative) number.
|
// If the - sign follows a symbol, it is treated as a (negative) number.
|
||||||
lexer.charType = (lexer.token == Token::Operator) ? CharType::Digit : CharType::Symbol;
|
lexer.charType = CharType::Symbol;
|
||||||
|
if (lexer.token == Token::Operator &&
|
||||||
|
lexer.value.oper != Operator::ClosingBracket) // Special case for e.g. (5)-2.
|
||||||
|
{
|
||||||
|
lexer.charType = CharType::Digit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (lexer.charType)
|
switch (lexer.charType)
|
||||||
|
Loading…
Reference in New Issue
Block a user