/* this function is quite liberal in what it accepts, as 'luaO_str2d' will reject ill-formed numerals.  */
static void read_numeral(LexState *ls, SemInfo *seminfo)
/* this function is quite liberal in what it accepts, as 'luaO_str2d' will reject ill-formed numerals.  */
static void read_numeral(LexState *ls, SemInfo *seminfo)
{
    if (check_next(ls, expo))
      check_next(ls, "+-");
    if (lisxdigit(ls->current) || ls->current == '.')
      save_and_next(ls);
    else  break;
  }
  save(ls, '\0');
  buffreplace(ls, '.', ls->decpoint);
  if (!buff2d(ls->buff, &seminfo->r))
    trydecpoint(ls, seminfo);
}