- Timestamp:
- Jan 18, 2022, 1:16:23 PM (2 years ago)
- 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. - Location:
- src/AST
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.cpp
r21a5bfb7 r175f9f4 26 26 #include "Node.hpp" // for readonly 27 27 #include "Type.hpp" // for readonly 28 #include "Expr.hpp" 28 29 29 30 namespace ast { … … 65 66 for (auto & tp : this->type_params) { 66 67 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 } 67 71 } 68 72 this->type = ftype; -
src/AST/Decl.hpp
r21a5bfb7 r175f9f4 34 34 // Must be included in *all* AST classes; should be #undef'd at the end of the file 35 35 #define MUTATE_FRIEND \ 36 36 template<typename node_t> friend node_t * mutate(const node_t * node); \ 37 37 template<typename node_t> friend node_t * shallowCopy(const node_t * node); 38 38 … … 135 135 std::vector< ptr<Expr> > withExprs; 136 136 137 138 137 FunctionDecl( const CodeLocation & loc, const std::string & name, std::vector<ptr<TypeDecl>>&& forall, 139 138 std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns, -
src/AST/Eval.hpp
r21a5bfb7 r175f9f4 24 24 template< typename... Args > 25 25 UntypedExpr * 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 }, 28 28 std::vector< ptr< Expr > > { std::forward< Args >( args )... } }; 29 29 }
Note: See TracChangeset
for help on using the changeset viewer.