mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: rename CommStmt and CaseStmt [generated]
Rename these two AST nodes to match their cmd/compile/internal/syntax and go/ast counterparts. Passes toolstash -cmp. [git-generate] cd src/cmd/compile/internal/ir rf ' mv CaseStmt CaseClause mv CommStmt CommClause ' sed -E -i -e 's/(Case|Comm)Stmt/\1Clause/g' mknode.go Change-Id: I19fba0323a5de1e71346622857011b2f7879bcef Reviewed-on: https://go-review.googlesource.com/c/go/+/280446 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
parent
5f3bd59a0d
commit
f8afb8216a
9 changed files with 54 additions and 54 deletions
|
|
@ -1212,8 +1212,8 @@ func (p *noder) switchStmt(stmt *syntax.SwitchStmt) ir.Node {
|
|||
return n
|
||||
}
|
||||
|
||||
func (p *noder) caseClauses(clauses []*syntax.CaseClause, tswitch *ir.TypeSwitchGuard, rbrace syntax.Pos) []*ir.CaseStmt {
|
||||
nodes := make([]*ir.CaseStmt, 0, len(clauses))
|
||||
func (p *noder) caseClauses(clauses []*syntax.CaseClause, tswitch *ir.TypeSwitchGuard, rbrace syntax.Pos) []*ir.CaseClause {
|
||||
nodes := make([]*ir.CaseClause, 0, len(clauses))
|
||||
for i, clause := range clauses {
|
||||
p.setlineno(clause)
|
||||
if i > 0 {
|
||||
|
|
@ -1263,8 +1263,8 @@ func (p *noder) selectStmt(stmt *syntax.SelectStmt) ir.Node {
|
|||
return ir.NewSelectStmt(p.pos(stmt), p.commClauses(stmt.Body, stmt.Rbrace))
|
||||
}
|
||||
|
||||
func (p *noder) commClauses(clauses []*syntax.CommClause, rbrace syntax.Pos) []*ir.CommStmt {
|
||||
nodes := make([]*ir.CommStmt, len(clauses))
|
||||
func (p *noder) commClauses(clauses []*syntax.CommClause, rbrace syntax.Pos) []*ir.CommClause {
|
||||
nodes := make([]*ir.CommClause, len(clauses))
|
||||
for i, clause := range clauses {
|
||||
p.setlineno(clause)
|
||||
if i > 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue