Changeset 8a6cf7e for src/SynTree
- Timestamp:
- Jul 26, 2017, 4:26:08 PM (8 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:
- 2afec66
- Parents:
- d335627
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
rd335627 r8a6cf7e 92 92 } 93 93 94 VariableExpr * VariableExpr::functionPointer( FunctionDecl * func ) { 95 VariableExpr * funcExpr = new VariableExpr( func ); 96 funcExpr->set_result( new PointerType( Type::Qualifiers(), funcExpr->get_result() ) ); 97 return funcExpr; 98 } 99 94 100 void VariableExpr::print( std::ostream &os, int indent ) const { 95 101 os << "Variable Expression: "; -
src/SynTree/Expression.h
rd335627 r8a6cf7e 259 259 void set_var( DeclarationWithType * newValue ) { var = newValue; } 260 260 261 static VariableExpr * functionPointer( FunctionDecl * decl ); 262 261 263 virtual VariableExpr * clone() const { return new VariableExpr( * this ); } 262 264 virtual void accept( Visitor & v ) { v.visit( this ); }
Note:
See TracChangeset
for help on using the changeset viewer.