Ignore:
Timestamp:
Mar 14, 2023, 12:56:41 PM (14 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
c19ca4b
Parents:
a96ce07
Message:

Removing some indent changes in parser. These can go in later, but hopefully this will avoid conflicts with the translation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cc

    ra96ce07 r0d0931d  
    99// Author           : Peter A. Buhr
    1010// Created On       : Sat May 16 13:17:07 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar 14 09:10:22 2023
    13 // Update Count     : 1081
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Tue Mar 14 12:00:00 2023
     13// Update Count     : 1082
    1414//
    1515
     
    122122                if ( str[i] == '1' ) v |= 1;
    123123                i += 1;
    124           if ( i == last - 1 || (str[i] != '0' && str[i] != '1') ) break;
     124                if ( i == last - 1 || (str[i] != '0' && str[i] != '1') ) break;
    125125                v <<= 1;
    126126        } // for
     
    168168                if ( posn = str.find_last_of( "pP" ); posn != string::npos ) {
    169169                        ltype = 5; str.erase( posn, 1 );
    170                         // size_t
     170                // size_t
    171171                } else if ( posn = str.find_last_of( "zZ" ); posn != string::npos ) {
    172172                        Unsigned = true; type = 2; ltype = 4; str.erase( posn, 1 );
    173                         // signed char
     173                // signed char
    174174                } else if ( posn = str.rfind( "hh" ); posn != string::npos ) {
    175175                        type = 1; str.erase( posn, 2 );
    176                         // signed char
     176                // signed char
    177177                } else if ( posn = str.rfind( "HH" ); posn != string::npos ) {
    178178                        type = 1; str.erase( posn, 2 );
    179                         // short
     179                // short
    180180                } else if ( posn = str.find_last_of( "hH" ); posn != string::npos ) {
    181181                        type = 0; str.erase( posn, 1 );
    182                         // int (natural number)
     182                // int (natural number)
    183183                } else if ( posn = str.find_last_of( "nN" ); posn != string::npos ) {
    184184                        type = 2; str.erase( posn, 1 );
     
    436436        Type * strtype;
    437437        switch ( str[0] ) {                                                                     // str has >= 2 characters, i.e, null string "" => safe to look at subscripts 0/1
    438           case 'u':
     438        case 'u':
    439439                if ( str[1] == '8' ) goto Default;                              // utf-8 characters => array of char
    440440                // lookup type of associated typedef
    441441                strtype = new TypeInstType( Type::Qualifiers( ), "char16_t", false );
    442442                break;
    443           case 'U':
     443        case 'U':
    444444                strtype = new TypeInstType( Type::Qualifiers( ), "char32_t", false );
    445445                break;
    446           case 'L':
     446        case 'L':
    447447                strtype = new TypeInstType( Type::Qualifiers( ), "wchar_t", false );
    448448                break;
    449           Default:                                                                                      // char default string type
    450           default:
     449        Default:                                                                                        // char default string type
     450        default:
    451451                strtype = new BasicType( Type::Qualifiers( ), BasicType::Char );
    452452        } // switch
Note: See TracChangeset for help on using the changeset viewer.