Changeset 2ca7fc2 for src


Ignore:
Timestamp:
Aug 10, 2024, 10:26:43 AM (3 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
6abb6dc
Parents:
af5baae
Message:

add better error message for an empty enumeration, i.e., no enumerators.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    raf5baae r2ca7fc2  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 26 14:09:30 2024
    13 // Update Count     : 6733
     12// Last Modified On : Sat Aug 10 09:47:05 2024
     13// Update Count     : 6734
    1414//
    1515
     
    28502850
    28512851enumerator_list:
    2852         visible_hide_opt identifier_or_type_name enumerator_value_opt
     2852        // empty
     2853                { SemanticError( yylloc, "enumeration must have a minimum of one enumerator, empty enumerator list is meaningless." );  $$ = nullptr; }
     2854        | visible_hide_opt identifier_or_type_name enumerator_value_opt
    28532855                { $$ = DeclarationNode::newEnumValueGeneric( $2, $3 ); }
    28542856        | INLINE type_name
Note: See TracChangeset for help on using the changeset viewer.