- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 36 for RangeStmt (0.15 sec)
-
src/cmd/compile/internal/walk/range.go
return n } // rangeAssign returns "n.Key = key". func rangeAssign(n *ir.RangeStmt, key ir.Node) ir.Node { key = rangeConvert(n, n.Key.Type(), key, n.KeyTypeWord, n.KeySrcRType) return ir.NewAssignStmt(n.Pos(), n.Key, key) } // rangeAssign2 returns "n.Key, n.Value = key, value". func rangeAssign2(n *ir.RangeStmt, key, value ir.Node) ir.Node { // Use OAS2 to correctly handle assignments
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 14:52:33 UTC 2023 - 17.6K bytes - Viewed (0) -
src/go/types/return.go
switch s := s.(type) { default: panic("unreachable") case *ast.BadStmt, *ast.DeclStmt, *ast.EmptyStmt, *ast.SendStmt, *ast.IncDecStmt, *ast.AssignStmt, *ast.GoStmt, *ast.DeferStmt, *ast.RangeStmt: // no chance case *ast.LabeledStmt: return check.isTerminating(s.Stmt, s.Label.Name) case *ast.ExprStmt: // calling the predeclared (possibly parenthesized) panic() function is terminating
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/go/types/labels.go
// whose execution terminates." valid := false if t := b.enclosingTarget(name); t != nil { switch t.Stmt.(type) { case *ast.SwitchStmt, *ast.TypeSwitchStmt, *ast.SelectStmt, *ast.ForStmt, *ast.RangeStmt: valid = true } } if !valid { check.errorf(s.Label, MisplacedLabel, "invalid break label %s", name) return } case token.CONTINUE:
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/vendor/golang.org/x/tools/go/cfg/cfg.go
KindIfThen // then block of IfStmt KindLabel // labeled block of BranchStmt (Stmt may be nil for dangling label) KindRangeBody // body of RangeStmt KindRangeDone // block after RangeStmt KindRangeLoop // head of RangeStmt KindSelectCaseBody // body of SelectStmt KindSelectDone // block after SelectStmt KindSelectAfterCase // block after a CommClause
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 7.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/cfg/builder.go
case *ast.TypeSwitchStmt: b.typeSwitchStmt(s, label) case *ast.SelectStmt: b.selectStmt(s, label) case *ast.ForStmt: b.forStmt(s, label) case *ast.RangeStmt: b.rangeStmt(s, label) default: panic(fmt.Sprintf("unexpected statement kind: %T", s)) } } func (b *builder) stmtList(list []ast.Stmt) { for _, s := range list { b.stmt(s) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 11.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go
(*ast.CallExpr)(nil), (*ast.CompositeLit)(nil), (*ast.FuncDecl)(nil), (*ast.FuncLit)(nil), (*ast.GenDecl)(nil), (*ast.RangeStmt)(nil), (*ast.ReturnStmt)(nil), } inspect.Preorder(nodeFilter, func(node ast.Node) { switch node := node.(type) { case *ast.RangeStmt: checkCopyLocksRange(pass, node) case *ast.FuncDecl: checkCopyLocksFunc(pass, node.Name.Name, node.Recv, node.Type) case *ast.FuncLit:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 9.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go
// when the specific type of x is known, so the cases cannot // be merged. case *ast.ForStmt: outer := d.breakTarget d.breakTarget = x d.findLabels(x.Body) d.breakTarget = outer case *ast.RangeStmt: outer := d.breakTarget d.breakTarget = x d.findLabels(x.Body) d.breakTarget = outer case *ast.SelectStmt: outer := d.breakTarget d.breakTarget = x d.findLabels(x.Body)
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/vendor/golang.org/x/tools/go/analysis/passes/loopclosure/loopclosure.go
Run: run, } func run(pass *analysis.Pass) (interface{}, error) { inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) nodeFilter := []ast.Node{ (*ast.File)(nil), (*ast.RangeStmt)(nil), (*ast.ForStmt)(nil), } inspect.Nodes(nodeFilter, func(n ast.Node, push bool) bool { if !push { // inspect.Nodes is slightly suboptimal as we only use push=true. return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 10.3K bytes - Viewed (0) -
src/cmd/gofmt/simplify.go
// about the lower bound. // An example where the 0 helps: // x, y, z := b[0:2], b[2:4], b[4:6] // An example where it does not: // x, y := b[:n], b[n:] case *ast.RangeStmt: // - a range of the form: for x, _ = range v {...} // can be simplified to: for x = range v {...} // - a range of the form: for _ = range v {...} // can be simplified to: for range v {...} if isBlank(n.Value) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 19 20:06:14 UTC 2022 - 4.8K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go
case *ast.LabeledStmt: return 1 << nLabeledStmt case *ast.MapType: return 1 << nMapType case *ast.Package: return 1 << nPackage case *ast.ParenExpr: return 1 << nParenExpr case *ast.RangeStmt: return 1 << nRangeStmt case *ast.ReturnStmt: return 1 << nReturnStmt case *ast.SelectStmt: return 1 << nSelectStmt case *ast.SelectorExpr: return 1 << nSelectorExpr case *ast.SendStmt:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 4.8K bytes - Viewed (0)