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

Fixes to the new templated pass and started on conversions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Attribute.hpp

    r712348a r6d51bd7  
    1919#include <vector>
    2020
     21#include "Fwd.hpp"
    2122#include "Node.hpp"     // for ptr
    2223#include "Visitor.hpp"
     
    3132        std::vector<ptr<Expr>> parameters;
    3233
    33         Attribute( const std::string& name = "", std::vector<ptr<Expr>>&& params = {})
     34        Attribute( const std::string & name = "", std::vector<ptr<Expr>> && params = {})
    3435        : name( name ), parameters( params ) {}
     36        virtual ~Attribute() = default;
    3537
    3638        bool empty() const { return name.empty(); }
     
    4244        bool isValidOnFuncParam() const;
    4345
    44         Attribute* accept( Visitor& v ) override { return v.visit( this ); }
     46        const Attribute * accept( Visitor & v ) const override { return v.visit( this ); }
    4547private:
    46         Attribute* clone() const override { return new Attribute{ *this }; }
     48        Attribute * clone() const override { return new Attribute{ *this }; }
     49
     50        /// Must be copied in ALL derived classes
     51        template<typename node_t>
     52        friend auto mutate(const node_t * node);
    4753};
    4854
Note: See TracChangeset for help on using the changeset viewer.