It's not used for anything.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/536636
-06ada1f2ab9b05e54641438db28c557c6900b2a3
+75b08794cb1485c955d13784c53a89174764af55
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
}
Type_switch_statement* statement =
- Statement::make_type_switch_statement(var_name, init, location);
+ Statement::make_type_switch_statement(init, location);
this->push_break_statement(statement, label);
Type_case_clauses* case_clauses = new Type_case_clauses();
{
ast_dump_context->print_indent();
ast_dump_context->ostream() << "switch ";
- if (!this->name_.empty())
- ast_dump_context->ostream() << this->name_ << " = ";
ast_dump_context->dump_expression(this->expr_);
ast_dump_context->ostream() << " .(type)";
if (ast_dump_context->dump_subblocks())
// Make a type switch statement.
Type_switch_statement*
-Statement::make_type_switch_statement(const std::string& name, Expression* expr,
- Location location)
+Statement::make_type_switch_statement(Expression* expr, Location location)
{
- return new Type_switch_statement(name, expr, location);
+ return new Type_switch_statement(expr, location);
}
// Class Send_statement.
// Make a type switch statement.
static Type_switch_statement*
- make_type_switch_statement(const std::string&, Expression*, Location);
+ make_type_switch_statement(Expression*, Location);
// Make a send statement.
static Send_statement*
class Type_switch_statement : public Statement
{
public:
- Type_switch_statement(const std::string& name, Expression* expr,
- Location location)
+ Type_switch_statement(Expression* expr, Location location)
: Statement(STATEMENT_TYPE_SWITCH, location),
- name_(name), expr_(expr), clauses_(NULL), break_label_(NULL)
+ expr_(expr), clauses_(NULL), break_label_(NULL)
{ }
// Add the clauses.
do_may_fall_through() const;
private:
- // The name of the variable declared in the type switch guard. Empty if there
- // is no variable declared.
- std::string name_;
- // The expression we are switching on if there is no variable.
+ // The expression we are switching on.
Expression* expr_;
// The type case clauses.
Type_case_clauses* clauses_;