Changeset b585593


Ignore:
Timestamp:
Jul 20, 2022, 12:11:21 PM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
2fd0de0
Parents:
11df881
Message:

Slight adjustment to FixNames?, same behaviour but a lighter implementation that doesn't use callbacks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/FixNames.cc

    r11df881 rb585593  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Oct 29 15:49:00 2021
    13 // Update Count     : 23
     12// Last Modified On : Wed Jul 20 11:49:00 2022
     13// Update Count     : 24
    1414//
    1515
     
    8787
    8888/// Does work with the main function and scopeLevels.
    89 class FixNames_new : public ast::WithGuards {
     89class FixNames_new final {
    9090        int scopeLevel = 1;
    9191
     
    129129
    130130        void previsit( const ast::CompoundStmt * ) {
    131                 GuardValue( scopeLevel ) += 1;
     131                scopeLevel += 1;
     132        }
     133
     134        void postvisit( const ast::CompoundStmt * ) {
     135                scopeLevel -= 1;
    132136        }
    133137};
Note: See TracChangeset for help on using the changeset viewer.