Changeset 8a9a3ab for src/Parser


Ignore:
Timestamp:
Sep 1, 2023, 3:54:42 PM (2 years ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
4b30318b
Parents:
4269d1b (diff), 4c0fa03 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r4269d1b r8a9a3ab  
    26912691        | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt identifier attribute_list_opt
    26922692                {
    2693                         if ( $3->storageClasses.any() || $3->type->qualifiers.val != 0 ) {
     2693                        if ( $3 && ($3->storageClasses.any() || $3->type->qualifiers.val != 0 )) {
    26942694                                SemanticError( yylloc, "syntax error, storage-class and CV qualifiers are not meaningful for enumeration constants, which are const." );
    26952695                        }
     
    28292829
    28302830cfa_abstract_parameter_declaration:                                             // CFA, new & old style parameter declaration
    2831         abstract_parameter_declaration
     2831        // empty
     2832                { $$ = nullptr; }
     2833        | abstract_parameter_declaration
    28322834        | cfa_identifier_parameter_declarator_no_tuple
    28332835        | cfa_abstract_tuple
     
    38543856                // { SemanticError( yylloc, "New array dimension is currently unimplemented." ); $$ = nullptr; }
    38553857        | '[' push array_type_list pop ']'                                      // CFA
    3856                 { SemanticError( yylloc, "Type array dimension is currently unimplemented." ); $$ = nullptr; }
     3858                { $$ = DeclarationNode::newArray( $3, nullptr, false ); }
    38573859        | multi_array_dimension
    38583860        ;
Note: See TracChangeset for help on using the changeset viewer.