Changeset b9be000b for src


Ignore:
Timestamp:
Dec 24, 2017, 8:02:48 AM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
1e6e08de
Parents:
3eb4541
Message:

parse _Static_assert in structure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r3eb4541 rb9be000b  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Nov 27 17:23:35 2017
    13 // Update Count     : 2992
     12// Last Modified On : Thu Dec 21 11:32:56 2017
     13// Update Count     : 2996
    1414//
    1515
     
    317317%type<decl> cfa_typedef_declaration cfa_variable_declaration cfa_variable_specifier
    318318
    319 %type<decl> c_declaration
     319%type<decl> c_declaration static_assert
    320320%type<decl> KR_function_declarator KR_function_no_ptr KR_function_ptr KR_function_array
    321321%type<decl> KR_declaration_list KR_declaration_list_opt
     
    835835        | exception_statement
    836836        | asm_statement
     837        ;
    837838
    838839labeled_statement:
     
    12821283        c_declaration pop ';'
    12831284        | cfa_declaration pop ';'                                                       // CFA
    1284         | STATICASSERT '(' constant_expression ',' string_literal ')' ';' // C11
     1285        | static_assert
     1286        ;
     1287
     1288static_assert:
     1289        STATICASSERT '(' constant_expression ',' string_literal ')' ';' // C11
    12851290                { throw SemanticError("Static assert is currently unimplemented."); $$ = nullptr; }     // FIX ME
    1286         ;
    12871291
    12881292// C declaration syntax is notoriously confusing and error prone. Cforall provides its own type, variable and function
     
    18901894                        $$ = distAttr( $2, $3 );
    18911895                }
     1896        | static_assert
    18921897        ;
    18931898
Note: See TracChangeset for help on using the changeset viewer.