- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for CommClause (0.37 sec)
-
src/cmd/compile/internal/syntax/nodes_test.go
{"CaseClause", `@default:`}, } var comms = []test{ {"CommClause", `@case <-ch:`}, {"CommClause", `@case x <- ch:`}, {"CommClause", `@case x = <-ch:`}, {"CommClause", `@case x := <-ch:`}, {"CommClause", `@case x, ok = <-ch: f(1, 2, 3)`}, {"CommClause", `@case x, ok := <-ch: x++`}, {"CommClause", `@default:`}, {"CommClause", `@default: ch <- true`}, } func TestPos(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 18:45:06 UTC 2023 - 8.7K bytes - Viewed (0) -
src/cmd/compile/internal/walk/select.go
init := ir.TakeInit(sel) init = append(init, walkSelectCases(sel.Cases)...) sel.Cases = nil sel.Compiled = init walkStmtList(sel.Compiled) base.Pos = lno } func walkSelectCases(cases []*ir.CommClause) []ir.Node { ncas := len(cases) sellineno := base.Pos // optimization: zero-case select if ncas == 0 { return []ir.Node{mkcallstmt("block")} } // optimization: one-case select: single op.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 01:53:41 UTC 2023 - 7.8K bytes - Viewed (0) -
src/go/types/return.go
return check.isTerminatingSwitch(s.Body, label) case *ast.TypeSwitchStmt: return check.isTerminatingSwitch(s.Body, label) case *ast.SelectStmt: for _, s := range s.Body.List { cc := s.(*ast.CommClause) if !check.isTerminatingList(cc.Body, "") || hasBreakList(cc.Body, label, true) { return false } } return true case *ast.ForStmt: if s.Cond == nil && !hasBreak(s.Body, label, true) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 4.2K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/positions.go
// case *SwitchStmt: // case *SelectStmt: // helper nodes case *RangeClause: if n.Lhs != nil { m = n.Lhs continue } m = n.X // case *CaseClause: // case *CommClause: default: return n.Pos() } } } // EndPos returns the approximate end position of n in the source. // For some nodes (*Name, *BasicLit) it returns the position immediately
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 17:49:19 UTC 2024 - 6.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go
d.findLabels(x.Body) d.breakTarget = outer case *ast.TypeSwitchStmt: outer := d.breakTarget d.breakTarget = x d.findLabels(x.Body) d.breakTarget = outer case *ast.CommClause: for _, stmt := range x.Body { d.findLabels(stmt) } case *ast.CaseClause: for _, stmt := range x.Body { d.findLabels(stmt) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 01:28:01 UTC 2023 - 7.6K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/nodes.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 14:52:38 UTC 2023 - 9K bytes - Viewed (0) -
src/cmd/compile/internal/types2/return.go
for _, s := range list { if hasBreakList(s.Body, label, implicit) { return true } } return false } func hasBreakCommList(list []*syntax.CommClause, label string, implicit bool) bool { for _, s := range list { if hasBreakList(s.Body, label, implicit) { return true } } return false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 4.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go
case *ast.BranchStmt: return 1 << nBranchStmt case *ast.CallExpr: return 1 << nCallExpr case *ast.CaseClause: return 1 << nCaseClause case *ast.ChanType: return 1 << nChanType case *ast.CommClause: return 1 << nCommClause case *ast.Comment: return 1 << nComment case *ast.CommentGroup: return 1 << nCommentGroup case *ast.CompositeLit: return 1 << nCompositeLit case *ast.DeclStmt:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 4.8K bytes - Viewed (0) -
src/go/types/labels.go
} case *ast.CaseClause: blockBranches(nil, s.Body) case *ast.SwitchStmt: stmtBranches(s.Body) case *ast.TypeSwitchStmt: stmtBranches(s.Body) case *ast.CommClause: blockBranches(nil, s.Body) case *ast.SelectStmt: stmtBranches(s.Body) case *ast.ForStmt: stmtBranches(s.Body) case *ast.RangeStmt: stmtBranches(s.Body) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 7.2K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/walk.go
case *RangeClause: if n.Lhs != nil { w.node(n.Lhs) } w.node(n.X) case *CaseClause: if n.Cases != nil { w.node(n.Cases) } w.stmtList(n.Body) case *CommClause: if n.Comm != nil { w.node(n.Comm) } w.stmtList(n.Body) default: panic(fmt.Sprintf("internal error: unknown node type %T", n)) } w.v.Visit(nil) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:55:04 UTC 2023 - 5.7K bytes - Viewed (0)