fix:测试
This commit is contained in:
@@ -215,8 +215,9 @@ public class NumberSemanticToken : SemanticToken
|
||||
|
||||
bool hasDecimalPoint = false;
|
||||
bool hasExponent = false;
|
||||
bool hasMinusSign = false;
|
||||
|
||||
while (now != null && (char.IsDigit(now.Value) || now.Value == '.' || now.Value == 'e' || now.Value == 'E'))
|
||||
while (now != null && (char.IsDigit(now.Value) || now.Value == '.' || now.Value == 'e' || now.Value == 'E' || now.Value == '-' || now.Value == '+'))
|
||||
{
|
||||
if (now.Value == '.')
|
||||
{
|
||||
@@ -236,6 +237,15 @@ public class NumberSemanticToken : SemanticToken
|
||||
hasExponent = true;
|
||||
}
|
||||
|
||||
if (now.Value == '-' || now.Value == '+')
|
||||
{
|
||||
if (hasMinusSign)
|
||||
{
|
||||
break;
|
||||
}
|
||||
hasMinusSign = true;
|
||||
}
|
||||
|
||||
buffer.Append(now.Value);
|
||||
now = now.Next;
|
||||
}
|
||||
|
Reference in New Issue
Block a user