Changeset 7675f58 for src/AST


Ignore:
Timestamp:
May 11, 2022, 4:22:38 PM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
491bb81
Parents:
3f681b1
Message:

Labels on statements (not all Labels in the AST) now have all their locations filled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Util.cpp

    r3f681b1 r7675f58  
    1010// Created On       : Wed Jan 19  9:46:00 2022
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed May  4 15:50:00 2022
    13 // Update Count     : 2
     12// Last Modified On : Wed May 11 16:16:00 2022
     13// Update Count     : 3
    1414//
    1515
     
    4848void isCodeLocationSet( const ParseNode * node ) {
    4949        assert( node->location.isSet() );
     50}
     51
     52void areLabelLocationsSet( const Stmt * stmt ) {
     53        for ( const Label& label : stmt->labels ) {
     54                assert( label.location.isSet() );
     55        }
    5056}
    5157
     
    97103        }
    98104
     105        void previsit( const Stmt * node ) {
     106                previsit( (const ParseNode *)node );
     107                areLabelLocationsSet( node );
     108        }
     109
    99110        void postvisit( const Node * node ) {
    100111                no_strong_cycles.postvisit( node );
Note: See TracChangeset for help on using the changeset viewer.