Changeset b1f2007d for src/ControlStruct


Ignore:
Timestamp:
Dec 13, 2023, 9:17:13 AM (22 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
4c2fe47
Parents:
c40157e
Message:

first attempt at simplifying SemanticError and its usage

Location:
src/ControlStruct
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/FixLabels.cpp

    rc40157e rb1f2007d  
    1010// Created On       : Mon Nov  1 09:39:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan 31 22:19:17 2022
    13 // Update Count     : 9
     12// Last Modified On : Sun Nov 26 15:06:51 2023
     13// Update Count     : 10
    1414//
    1515
     
    4747        for ( auto kvp : labelTable ) {
    4848                if ( nullptr == kvp.second ) {
    49                         SemanticError( kvp.first.location,
    50                                                    "Use of undefined label: " + kvp.first.name );
     49                        SemanticError( kvp.first.location, "Use of undefined label %s.", kvp.first.name.c_str() );
    5150                }
    5251        }
  • src/ControlStruct/MultiLevelExit.cpp

    rc40157e rb1f2007d  
    99// Author           : Andrew Beach
    1010// Created On       : Mon Nov  1 13:48:00 2021
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Sep  8 17:04:00 2023
    13 // Update Count     : 36
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Dec 11 13:44:45 2023
     13// Update Count     : 38
    1414//
    1515
     
    521521                assert(0);
    522522        }
    523         SemanticError( stmt->location, toString( "'return' may not appear in a ", context ) );
     523        SemanticError( stmt->location, "'return' may not appear in a %s", context );
    524524}
    525525
Note: See TracChangeset for help on using the changeset viewer.