token = this->peek_token();
if (token->is_op(OPERATOR_CHANOP))
{
- this->send_stmt(this->verify_not_sink(exp));
+ this->send_stmt(this->verify_not_sink(exp), may_be_composite_lit);
if (return_exp != NULL)
*return_exp = true;
}
// Channel = Expression .
void
-Parse::send_stmt(Expression* channel)
+Parse::send_stmt(Expression* channel, bool may_be_composite_lit)
{
go_assert(this->peek_token()->is_op(OPERATOR_CHANOP));
Location loc = this->location();
this->advance_token();
- Expression* val = this->expression(PRECEDENCE_NORMAL, false, true, NULL,
- NULL);
+ Expression* val = this->expression(PRECEDENCE_NORMAL, false,
+ may_be_composite_lit, NULL, NULL);
Statement* s = Statement::make_send_statement(channel, val, loc);
this->gogo_->add_statement(s);
}
void statement_list();
bool statement_list_may_start_here();
void expression_stat(Expression*);
- void send_stmt(Expression*);
+ void send_stmt(Expression*, bool may_be_composite_lit);
void inc_dec_stat(Expression*);
void assignment(Expression*, bool may_be_composite_lit, Range_clause*);
void tuple_assignment(Expression_list*, bool may_be_composite_lit,