Ignore:
Timestamp:
Apr 13, 2022, 2:55:51 PM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
365c8dcb
Parents:
6b06abe
Message:

Converted validate C, including adding DimensionExpr? to the new ast.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.impl.hpp

    r6b06abe r4ec9513  
    575575                        __pass::symtab::addId( core, 0, func );
    576576                        if ( __visit_children() ) {
    577                                 // parameter declarations
     577                                maybe_accept( node, &FunctionDecl::type_params );
     578                                maybe_accept( node, &FunctionDecl::assertions );
    578579                                maybe_accept( node, &FunctionDecl::params );
    579580                                maybe_accept( node, &FunctionDecl::returns );
    580                                 // type params and assertions
    581                                 maybe_accept( node, &FunctionDecl::type_params );
    582                                 maybe_accept( node, &FunctionDecl::assertions );
     581                                maybe_accept( node, &FunctionDecl::type );
    583582                                // First remember that we are now within a function.
    584583                                ValueGuard< bool > oldInFunction( inFunction );
     
    15221521
    15231522//--------------------------------------------------------------------------
     1523// DimensionExpr
     1524template< typename core_t >
     1525const ast::Expr * ast::Pass< core_t >::visit( const ast::DimensionExpr * node ) {
     1526        VISIT_START( node );
     1527
     1528        if ( __visit_children() ) {
     1529                guard_symtab guard { *this };
     1530                maybe_accept( node, &DimensionExpr::result );
     1531        }
     1532
     1533        VISIT_END( Expr, node );
     1534}
     1535
     1536//--------------------------------------------------------------------------
    15241537// AsmExpr
    15251538template< typename core_t >
     
    18591872
    18601873        if ( __visit_children() ) {
    1861                 // xxx - should PointerType visit/mutate dimension?
     1874                maybe_accept( node, &PointerType::dimension );
    18621875                maybe_accept( node, &PointerType::base );
    18631876        }
Note: See TracChangeset for help on using the changeset viewer.