Changeset 871cdb4
- Timestamp:
- Sep 7, 2017, 10:35:32 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- b3f252a
- Parents:
- 234223f
- Location:
- src/SynTree
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
r234223f r871cdb4 155 155 virtual ~FunctionDecl(); 156 156 157 Type * get_type() const ;158 virtual void set_type(Type * );157 Type * get_type() const { return type; } 158 virtual void set_type(Type * t) { type = safe_dynamic_cast< FunctionType* >( t ); } 159 159 160 160 FunctionType * get_functionType() const { return type; } -
src/SynTree/Expression.h
r234223f r871cdb4 84 84 public: 85 85 Expression * function; 86 std::list<Expression *> args; 87 InferredParams inferParams; 86 88 87 89 ApplicationExpr( Expression * function, const std::list<Expression *> & args = std::list< Expression * >() ); … … 98 100 virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); } 99 101 virtual void print( std::ostream & os, int indent = 0 ) const; 100 101 private:102 std::list<Expression *> args;103 InferredParams inferParams;104 102 }; 105 103 -
src/SynTree/FunctionDecl.cc
r234223f r871cdb4 44 44 delete type; 45 45 delete statements; 46 }47 48 Type * FunctionDecl::get_type() const {49 return type;50 }51 52 void FunctionDecl::set_type( Type *t ) {53 type = dynamic_cast< FunctionType* >( t );54 assert( type );55 46 } 56 47 -
src/SynTree/Statement.h
r234223f r871cdb4 155 155 public: 156 156 Expression * condition; 157 std::list<Statement *> statements; 157 158 158 159 SwitchStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &statements ); … … 170 171 virtual SwitchStmt *clone() const { return new SwitchStmt( *this ); } 171 172 virtual void print( std::ostream &os, int indent = 0 ) const; 172 private: 173 std::list<Statement *> statements; 173 174 174 }; 175 175 … … 327 327 class TryStmt : public Statement { 328 328 public: 329 CompoundStmt * block;329 CompoundStmt * block; 330 330 std::list<CatchStmt *> handlers; 331 FinallyStmt * finallyBlock;331 FinallyStmt * finallyBlock; 332 332 333 333 TryStmt( std::list<Label> labels, CompoundStmt *tryBlock, std::list<CatchStmt *> &handlers, FinallyStmt *finallyBlock = 0 );
Note: See TracChangeset
for help on using the changeset viewer.