Skip to content
Snippets Groups Projects
Commit 55794c3e authored by Ronald Charles Moore's avatar Ronald Charles Moore
Browse files

Fix for Issue#1

parent 5a284edb
No related branches found
No related tags found
No related merge requests found
...@@ -113,7 +113,7 @@ Token gettok( ) { ...@@ -113,7 +113,7 @@ Token gettok( ) {
}; };
// else if strtod found a real number (or at least a double) // else if strtod found a real number (or at least a double)
result.first = tok_number; result.first = tok_number;
result.second = tmpValue; // let C++ do any converisons result.second = static_cast<numberType>(tmpValue);
currentColumnNumber += (omega - alpha) -1; currentColumnNumber += (omega - alpha) -1;
// minus one because we incremented it before the switch // minus one because we incremented it before the switch
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
namespace lex { namespace lex {
// Utility Types // Utility Types
typedef double numberType; // feel fee to change this to something else like int or float or bigint.... typedef double numberType; // also works with (at least) float or long
// See https://en.cppreference.com/w/cpp/numeric/math/nan // See https://en.cppreference.com/w/cpp/numeric/math/nan
static const numberType bad_number = std::nan( "1" ); static const numberType bad_number = std::nan( "1" );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment