Changeset 175f9f4 for src/AST


Ignore:
Timestamp:
Jan 18, 2022, 1:16:23 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
1e8b4b49, adfd125
Parents:
21a5bfb7 (diff), 91a72ef (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/AST
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Decl.cpp

    r21a5bfb7 r175f9f4  
    2626#include "Node.hpp"            // for readonly
    2727#include "Type.hpp"            // for readonly
     28#include "Expr.hpp"
    2829
    2930namespace ast {
     
    6566        for (auto & tp : this->type_params) {
    6667                ftype->forall.emplace_back(new TypeInstType(tp->name, tp));
     68                for (auto & ap: tp->assertions) {
     69                        ftype->assertions.emplace_back(new VariableExpr(loc, ap));
     70                }
    6771        }
    6872        this->type = ftype;
  • src/AST/Decl.hpp

    r21a5bfb7 r175f9f4  
    3434// Must be included in *all* AST classes; should be #undef'd at the end of the file
    3535#define MUTATE_FRIEND \
    36     template<typename node_t> friend node_t * mutate(const node_t * node); \
     36        template<typename node_t> friend node_t * mutate(const node_t * node); \
    3737        template<typename node_t> friend node_t * shallowCopy(const node_t * node);
    3838
     
    135135        std::vector< ptr<Expr> > withExprs;
    136136
    137 
    138137        FunctionDecl( const CodeLocation & loc, const std::string & name, std::vector<ptr<TypeDecl>>&& forall,
    139138                std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns,
  • src/AST/Eval.hpp

    r21a5bfb7 r175f9f4  
    2424template< typename... Args >
    2525UntypedExpr * call( const CodeLocation & loc, const std::string & name, Args &&... args ) {
    26         return new UntypedExpr { 
    27                 loc, new NameExpr { loc, name }, 
     26        return new UntypedExpr {
     27                loc, new NameExpr { loc, name },
    2828                std::vector< ptr< Expr > > { std::forward< Args >( args )... } };
    2929}
Note: See TracChangeset for help on using the changeset viewer.