fix: 修复了在解析字面量时的条件逻辑,确保整数转换在浮点数转换之后进行

This commit is contained in:
2026-02-25 19:15:25 +08:00
parent a0fb8cdffb
commit 12dc31a6c0

View File

@@ -54,8 +54,11 @@ namespace Fig
double d = std::stod(lexeme.toStdString());
v = Value::FromDouble(d);
}
std::int32_t i = std::stoi(lexeme.toStdString());
v = Value::FromInt(i);
else
{
std::int32_t i = std::stoi(lexeme.toStdString());
v = Value::FromInt(i);
}
}
else
{