Changeset f2ff0a6 for src


Ignore:
Timestamp:
Oct 31, 2022, 2:42:31 PM (18 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
7f3b5ce
Parents:
994028dc
Message:

Function attributes are now visited earlier, so they are not considered to be within the function/function's body.

Location:
src
Files:
2 edited

Legend:

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

    r994028dc rf2ff0a6  
    617617                                maybe_accept( node, &FunctionDecl::returns );
    618618                                maybe_accept( node, &FunctionDecl::type );
     619                                maybe_accept( node, &FunctionDecl::attributes );
    619620                                // First remember that we are now within a function.
    620621                                ValueGuard< bool > oldInFunction( inFunction );
     
    625626                                atFunctionTop = true;
    626627                                maybe_accept( node, &FunctionDecl::stmts );
    627                                 maybe_accept( node, &FunctionDecl::attributes );
    628628                        }
    629629                }
  • src/Common/PassVisitor.impl.h

    r994028dc rf2ff0a6  
    607607                        indexerAddId( &func );
    608608                        maybeMutate_impl( node->type, *this );
     609                        maybeMutate_impl( node->attributes, *this );
    609610                        // First remember that we are now within a function.
    610611                        ValueGuard< bool > oldInFunction( inFunction );
     
    615616                        atFunctionTop = true;
    616617                        maybeMutate_impl( node->statements, *this );
    617                         maybeMutate_impl( node->attributes, *this );
    618618                }
    619619        }
Note: See TracChangeset for help on using the changeset viewer.