|
|
@ -211,6 +211,7 @@ Value Parser::getNumber() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (fractionPosition != 0 || exponentPosition != 0) { |
|
|
|
if (fractionPosition == exponentPosition - 1) { |
|
|
|
if (fractionPosition == exponentPosition - 1) { |
|
|
|
reportError(token, "invalid exponent sign, expected number"); |
|
|
|
reportError(token, "invalid exponent sign, expected number"); |
|
|
|
return nullptr; |
|
|
|
return nullptr; |
|
|
@ -220,6 +221,7 @@ Value Parser::getNumber() |
|
|
|
reportError(token, "invalid number"); |
|
|
|
reportError(token, "invalid number"); |
|
|
|
return nullptr; |
|
|
|
return nullptr; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return std::stod(token.symbol); |
|
|
|
return std::stod(token.symbol); |
|
|
|
} |
|
|
|
} |
|
|
|