Changeset 65660bd for src/SynTree
- Timestamp:
- Sep 22, 2016, 8:14:56 AM (9 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:
- ac9ca96
- Parents:
- 1132b62
- git-author:
- Rob Schluntz <rschlunt@…> (09/21/16 23:43:37)
- git-committer:
- Rob Schluntz <rschlunt@…> (09/22/16 08:14:56)
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
r1132b62 r65660bd 696 696 }; 697 697 698 /// TupleAssignExpr represents a multiple assignment operation, where both sides of the assignment have tuple type, e.g. [a, b, c] = [d, e, f];, or a mass assignment operation, where the left hand side has tuple type and the right hand side does not, e.g. [a, b, c] = 5.0;698 /// TupleAssignExpr represents a multiple assignment operation, where both sides of the assignment have tuple type, e.g. [a, b, c] = [d, e, f];, a mass assignment operation, where the left hand side has tuple type and the right hand side does not, e.g. [a, b, c] = 5.0;, or a tuple ctor/dtor expression 699 699 class TupleAssignExpr : public Expression { 700 700 public: -
src/SynTree/TupleExpr.cc
r1132b62 r65660bd 88 88 89 89 TupleAssignExpr::TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls, Expression * _aname ) : Expression( _aname ), assigns( assigns ), tempDecls( tempDecls ) { 90 TupleType * type = new TupleType( Type::Qualifiers() ); 91 for ( Expression * expr : assigns ) { 92 assert( expr->has_result() ); 93 type->get_types().push_back( expr->get_result()->clone() ); 94 } 95 set_result( type ); 90 set_result( Tuples::makeTupleType( assigns ) ); 96 91 } 97 92
Note:
See TracChangeset
for help on using the changeset viewer.