Changeset 52a2248
- Timestamp:
- Mar 16, 2023, 2:20:01 PM (21 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 1fd3d85
- Parents:
- 360bfe41
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ExpressionNode.cc
r360bfe41 r52a2248 164 164 } else { 165 165 // At least one digit in integer constant, so safe to backup while looking for suffix. 166 // This declaration and the comma expressions in the conditions mimic 167 // the declare and check pattern allowed in later compiler versions. 168 // (Only some early compilers/C++ standards do not support it.) 166 169 string::size_type posn; 167 170 // pointer value 168 if ( posn = str.find_last_of( "pP" ) ;posn != string::npos ) {171 if ( posn = str.find_last_of( "pP" ), posn != string::npos ) { 169 172 ltype = 5; str.erase( posn, 1 ); 170 173 // size_t 171 } else if ( posn = str.find_last_of( "zZ" ) ;posn != string::npos ) {174 } else if ( posn = str.find_last_of( "zZ" ), posn != string::npos ) { 172 175 Unsigned = true; type = 2; ltype = 4; str.erase( posn, 1 ); 173 176 // signed char 174 } else if ( posn = str.rfind( "hh" ) ;posn != string::npos ) {177 } else if ( posn = str.rfind( "hh" ), posn != string::npos ) { 175 178 type = 1; str.erase( posn, 2 ); 176 179 // signed char 177 } else if ( posn = str.rfind( "HH" ) ;posn != string::npos ) {180 } else if ( posn = str.rfind( "HH" ), posn != string::npos ) { 178 181 type = 1; str.erase( posn, 2 ); 179 182 // short 180 } else if ( posn = str.find_last_of( "hH" ) ;posn != string::npos ) {183 } else if ( posn = str.find_last_of( "hH" ), posn != string::npos ) { 181 184 type = 0; str.erase( posn, 1 ); 182 185 // int (natural number) 183 } else if ( posn = str.find_last_of( "nN" ) ;posn != string::npos ) {186 } else if ( posn = str.find_last_of( "nN" ), posn != string::npos ) { 184 187 type = 2; str.erase( posn, 1 ); 185 188 } else if ( str.rfind( "ll" ) != string::npos || str.rfind( "LL" ) != string::npos ) {
Note: See TracChangeset
for help on using the changeset viewer.