Changeset 5b95e67 for src


Ignore:
Timestamp:
Sep 11, 2024, 4:31:16 PM (8 weeks ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
05f8761
Parents:
20c2ade
Message:

fix spelling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cpp

    r20c2ade r5b95e67  
    99// Author           : Peter A. Buhr
    1010// Created On       : Sat May 16 13:17:07 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Aug 23 10:22:00 2024
    13 // Update Count     : 1088
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Sep 11 16:28:06 2024
     13// Update Count     : 1089
    1414//
    1515
     
    477477        if ( '\\' != str[pos] ) return 1;
    478478        switch ( str[pos + 1] ) {
    479         // Simple Escape Sequence (\_ where _ is one of the following):
    480         case '\'': case '\"': case '?': case '\\':
    481         case 'a': case 'b': case 'f': case 'n': case 'r': case 't': case 'v':
    482         // GCC Escape Sequence (as simple, just some different letters):
    483         case 'e':
     479                // Simple Escape Sequence (\_ where _ is one of the following):
     480          case '\'': case '\"': case '?': case '\\':
     481          case 'a': case 'b': case 'f': case 'n': case 'r': case 't': case 'v':
     482                // GCC Escape Sequence (as simple, just some different letters):
     483          case 'e':
    484484                return 2;
    485         // Numeric Escape Sequence (\___ where _ is 1-3 octal digits):
    486         case '0': case '1': case '2': case '3':
    487         case '4': case '5': case '6': case '7':
     485                // Numeric Escape Sequence (\___ where _ is 1-3 octal digits):
     486          case '0': case '1': case '2': case '3':
     487          case '4': case '5': case '6': case '7':
    488488                return ( !isoctal( str[pos + 2] ) ) ? 2 :
    489                        ( !isoctal( str[pos + 3] ) ) ? 3 : 4;
    490         // Numeric Escape Sequence (\x_ where _ is 1 or more hexadecimal digits):
    491         case 'x': {
    492                 size_t length = 2;
    493                 while ( ishexadecimal( str[pos + length] ) ) ++length;
    494                 return length;
    495         }
    496         // Uniersal Character Name (\u____ where _ is 4 decimal digits):
    497         case 'u':
     489                  ( !isoctal( str[pos + 3] ) ) ? 3 : 4;
     490                  // Numeric Escape Sequence (\x_ where _ is 1 or more hexadecimal digits):
     491          case 'x': {
     492                  size_t length = 2;
     493                  while ( ishexadecimal( str[pos + length] ) ) ++length;
     494                  return length;
     495          }
     496                // Universal Character Name (\u____ where _ is 4 decimal digits):
     497          case 'u':
    498498                return 6;
    499         // Uniersal Character Name (\U________ where _ is 8 decimal digits):
    500         case 'U':
     499                // Universal Character Name (\U________ where _ is 8 decimal digits):
     500          case 'U':
    501501                return 10;
    502         default:
     502          default:
    503503                assertf( false, "Unknown escape sequence (start %c).", str[pos] );
    504504                return 1;
Note: See TracChangeset for help on using the changeset viewer.