Ignore:
Timestamp:
May 25, 2018, 5:01:37 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
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, with_gc
Children:
3ed994e
Parents:
2c88368
git-author:
Rob Schluntz <rschlunt@…> (05/25/18 16:59:30)
git-committer:
Rob Schluntz <rschlunt@…> (05/25/18 17:01:37)
Message:

Add AST support for _Generic, along with C codegen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.impl.h

    r2c88368 rd807ca28  
    20732073
    20742074//--------------------------------------------------------------------------
     2075// GenericExpr
     2076template< typename pass_type >
     2077void PassVisitor< pass_type >::visit( GenericExpr * node ) {
     2078        VISIT_START( node );
     2079
     2080        indexerScopedAccept( node->result, *this );
     2081        maybeAccept_impl( node->control, *this );
     2082        for ( GenericExpr::Association & assoc : node->associations ) {
     2083                indexerScopedAccept( assoc.type, *this );
     2084                maybeAccept_impl( assoc.expr, *this );
     2085        }
     2086
     2087        VISIT_END( node );
     2088}
     2089
     2090template< typename pass_type >
     2091Expression * PassVisitor< pass_type >::mutate( GenericExpr * node ) {
     2092        MUTATE_START( node );
     2093
     2094        indexerScopedMutate( node->env, *this );
     2095        indexerScopedMutate( node->result, *this );
     2096        maybeMutate_impl( node->control, *this );
     2097        for ( GenericExpr::Association & assoc : node->associations ) {
     2098                indexerScopedMutate( assoc.type, *this );
     2099                maybeMutate_impl( assoc.expr, *this );
     2100        }
     2101
     2102        MUTATE_END( Expression, node );
     2103}
     2104
     2105//--------------------------------------------------------------------------
    20752106// VoidType
    20762107template< typename pass_type >
Note: See TracChangeset for help on using the changeset viewer.