Changeset 2ac78a1


Ignore:
Timestamp:
Sep 13, 2024, 8:27:39 AM (7 weeks ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
3733643
Parents:
c5f69fd
Message:

switch to isxdigit and floating point changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cpp

    rc5f69fd r2ac78a1  
    1010// Created On       : Sat May 16 13:17:07 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Sep 11 16:28:06 2024
    13 // Update Count     : 1089
     12// Last Modified On : Thu Sep 12 22:40:35 2024
     13// Update Count     : 1090
    1414//
    1515
     
    381381                const CodeLocation & location, string & str ) {
    382382        static const ast::BasicKind kind[2][12] = {
    383                 { ast::BasicKind::Float, ast::BasicKind::Double, ast::BasicKind::LongDouble, ast::BasicKind::uuFloat80, ast::BasicKind::uuFloat128, ast::BasicKind::uFloat16, ast::BasicKind::uFloat32, ast::BasicKind::uFloat32x, ast::BasicKind::uFloat64, ast::BasicKind::uFloat64x, ast::BasicKind::uFloat128, ast::BasicKind::uFloat128x },
    384                 { ast::BasicKind::FloatComplex, ast::BasicKind::DoubleComplex, ast::BasicKind::LongDoubleComplex, ast::BasicKind::NUMBER_OF_BASIC_TYPES, ast::BasicKind::NUMBER_OF_BASIC_TYPES, ast::BasicKind::uFloat16Complex, ast::BasicKind::uFloat32Complex, ast::BasicKind::uFloat32xComplex, ast::BasicKind::uFloat64Complex, ast::BasicKind::uFloat64xComplex, ast::BasicKind::uFloat128Complex, ast::BasicKind::uFloat128xComplex },
     383                { ast::BasicKind::Float, ast::BasicKind::Double, ast::BasicKind::LongDouble, ast::BasicKind::Float80, ast::BasicKind::uuFloat128, ast::BasicKind::Float16, ast::BasicKind::Float32, ast::BasicKind::Float32x, ast::BasicKind::Float64, ast::BasicKind::Float64x, ast::BasicKind::Float128, ast::BasicKind::Float128x },
     384                { ast::BasicKind::FloatComplex, ast::BasicKind::DoubleComplex, ast::BasicKind::LongDoubleComplex, ast::BasicKind::NUMBER_OF_BASIC_TYPES, ast::BasicKind::NUMBER_OF_BASIC_TYPES, ast::BasicKind::Float16Complex, ast::BasicKind::Float32Complex, ast::BasicKind::Float32xComplex, ast::BasicKind::Float64Complex, ast::BasicKind::Float64xComplex, ast::BasicKind::Float128Complex, ast::BasicKind::Float128xComplex },
    385385        };
    386386
     
    463463static bool isoctal( char ch ) {
    464464        return ('0' <= ch && ch <= '7');
    465 }
    466 
    467 static bool ishexadecimal( char ch ) {
    468         return (('0' <= ch && ch <= '9')
    469                 || ('a' <= ch && ch <= 'f')
    470                 || ('A' <= ch && ch <= 'F'));
    471465}
    472466
     
    491485          case 'x': {
    492486                  size_t length = 2;
    493                   while ( ishexadecimal( str[pos + length] ) ) ++length;
     487                  while ( isxdigit( str[pos + length] ) ) ++length;
    494488                  return length;
    495489          }
Note: See TracChangeset for help on using the changeset viewer.