Changeset d0bdb18


Ignore:
Timestamp:
Dec 19, 2022, 2:04:29 PM (16 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
d18540f
Parents:
cbd1ba8
Message:

Removed extra scope calls in the new Pass. Added some documentation on the core's possible special members.

Location:
src/AST
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.hpp

    rcbd1ba8 rd0bdb18  
    6666//
    6767// Other Special Members:
     68// | beginScope            - A method with no parameters or return value, called each time the
     69//                           visitor enters a block.
     70// | endScope              - A method with no parameters or return value, called each time the
     71//                           visitor leaves a block.
    6872// | result                - Either a method that takes no parameters or a field. If a method (or
    6973//                           callable field) get_result calls it, otherwise the value is returned.
  • src/AST/Pass.impl.hpp

    rcbd1ba8 rd0bdb18  
    836836                        if ( enterScope ) {
    837837                                __pass::symtab::enter(core, 0);
    838                                 __pass::scope::enter(core, 0);
    839838                        }
    840839                }, [this, leaveScope = !this->atFunctionTop]() {
    841840                        if ( leaveScope ) {
    842841                                __pass::symtab::leave(core, 0);
    843                                 __pass::scope::leave(core, 0);
    844842                        }
    845843                });
Note: See TracChangeset for help on using the changeset viewer.