File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -379,6 +379,7 @@ std::optional<size_t> Lexer::exp_float_number(size_t n) const
379379 // [0-9](?:_?[0-9])*)
380380 if (!(peek (n) >= ' 0' && peek (n) <= ' 9' )) { return {}; }
381381 n++;
382+ if (peek (n) == ' .' ) { n++; }
382383 auto result = parse_digits (n, [](const char c) { return std::isdigit (c); });
383384 if (result) { return exp_number (*result); }
384385 return {};
@@ -413,9 +414,9 @@ std::optional<size_t> Lexer::imag_number(size_t n) const
413414
414415std::optional<size_t > Lexer::float_number (size_t n) const
415416{
416- if (auto end = point_float_number (n)) {
417+ if (auto end = exp_float_number (n)) {
417418 return *end;
418- } else if (auto end = exp_float_number (n)) {
419+ } else if (auto end = point_float_number (n)) {
419420 return *end;
420421 } else {
421422 return {};
You can’t perform that action at this time.
0 commit comments