Changeset 6d51bd7 for src/AST/porting.md


Ignore:
Timestamp:
May 15, 2019, 10:15:44 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
be567e9
Parents:
712348a
Message:

Fixes to the new templated pass and started on conversions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/porting.md

    r712348a r6d51bd7  
    88## Visitors ##
    99* `Visitor` and `Mutator` are combined into a single `ast::Visitor` class
    10   * Base nodes now override `Node* accept( Visitor& v ) = 0` with, e.g. `Stmt* accept( Visitor& v ) override = 0`
     10  * Base nodes now override `const Node * accept( Visitor & v ) const = 0` with, e.g. `const Stmt * accept( Visitor & v ) const override = 0`
    1111* `PassVisitor` is replaced with `ast::Pass`
    1212
     
    2424`clone` is private to `Node` now
    2525* still needs to be overriden to return appropriate type
    26   * e.g. `private: virtual Stmt* clone() const override = 0;`
     26  * e.g. `private: virtual Stmt * clone() const override = 0;`
     27  * because friendship is not inherited, all implementations of clone need
     28      /// Must be copied in ALL derived classes
     29      template<typename node_t>
     30      friend auto mutate(const node_t * node);
    2731
    2832All leaves of the `Node` inheritance tree are now declared `final`
Note: See TracChangeset for help on using the changeset viewer.