- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 40 for forStmt (0.37 sec)
-
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go
a.apply(n, "Body", nil, n.Body) case *ast.CommClause: a.apply(n, "Comm", nil, n.Comm) a.applyList(n, "Body") case *ast.SelectStmt: a.apply(n, "Body", nil, n.Body) case *ast.ForStmt: a.apply(n, "Init", nil, n.Init) a.apply(n, "Cond", nil, n.Cond) a.apply(n, "Post", nil, n.Post) a.apply(n, "Body", nil, n.Body) case *ast.RangeStmt: a.apply(n, "Key", nil, n.Key)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 12.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/stmt.go
} check.openScopeUntil(clause, end, "case") if clause.Comm != nil { check.stmt(inner, clause.Comm) } check.stmtList(inner, clause.Body) check.closeScope() } case *syntax.ForStmt: inner |= breakOk | continueOk if rclause, _ := s.Init.(*syntax.RangeClause); rclause != nil { check.rangeStmt(inner, s, rclause) break } check.openScope(s, "for")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/api.go
// *syntax.FuncType // *syntax.TypeDecl // *syntax.BlockStmt // *syntax.IfStmt // *syntax.SwitchStmt // *syntax.CaseClause // *syntax.CommClause // *syntax.ForStmt // Scopes map[syntax.Node]*Scope // InitOrder is the list of package-level initializers in the order in which // they must be executed. Initializers referring to variables related by an
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 13:48:53 UTC 2024 - 17.4K bytes - Viewed (0) -
src/go/types/api.go
// *ast.FuncType // *ast.TypeSpec // *ast.BlockStmt // *ast.IfStmt // *ast.SwitchStmt // *ast.TypeSwitchStmt // *ast.CaseClause // *ast.CommClause // *ast.ForStmt // *ast.RangeStmt // Scopes map[ast.Node]*Scope // InitOrder is the list of package-level initializers in the order in which // they must be executed. Initializers referring to variables related by an
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 17.2K bytes - Viewed (0) -
src/go/parser/resolver.go
r.walkStmts(n.Body) case *ast.SelectStmt: // as for switch statements, select statement bodies don't get their own // scope. if n.Body != nil { r.walkStmts(n.Body.List) } case *ast.ForStmt: r.openScope(n.Pos()) defer r.closeScope() if n.Init != nil { ast.Walk(r, n.Init) } if n.Cond != nil { ast.Walk(r, n.Cond) } if n.Post != nil { ast.Walk(r, n.Post) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 12:56:53 UTC 2023 - 15.8K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/stmt.go
n.X = Expr(n.X) if !n.X.Type().IsPtrShaped() { base.FatalfAt(n.Pos(), "%L is not pointer shaped", n.X) } return n } // tcFor typechecks an OFOR node. func tcFor(n *ir.ForStmt) ir.Node { Stmts(n.Init()) n.Cond = Expr(n.Cond) n.Cond = DefaultLit(n.Cond, nil) if n.Cond != nil { t := n.Cond.Type() if t != nil && !t.IsBoolean() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:10:54 UTC 2023 - 17.8K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/printer.go
case *RangeClause: if n.Lhs != nil { tok := _Assign if n.Def { tok = _Define } p.print(n.Lhs, blank, tok, blank) } p.print(_Range, blank, n.X) case *ForStmt: p.print(_For, blank) if n.Init == nil && n.Post == nil { if n.Cond != nil { p.print(n.Cond, blank) } } else { if n.Init != nil { p.print(n.Init) // TODO(gri) clean this up
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 24 07:17:27 UTC 2023 - 21.5K bytes - Viewed (0) -
src/cmd/compile/internal/ir/fmt.go
} else { fmt.Fprintf(s, "if %v { %v }", n.Cond, n.Body) } if len(n.Else) != 0 { fmt.Fprintf(s, " else { %v }", n.Else) } case OFOR: n := n.(*ForStmt) if !exportFormat { // TODO maybe only if FmtShort, same below fmt.Fprintf(s, "for loop") break } fmt.Fprint(s, "for") if n.DistinctVars { fmt.Fprint(s, " /* distinct */") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 15:20:28 UTC 2023 - 26K bytes - Viewed (0) -
src/go/types/stmt.go
} check.openScope(s, "case") if clause.Comm != nil { check.stmt(inner, clause.Comm) } check.stmtList(inner, clause.Body) check.closeScope() } case *ast.ForStmt: inner |= breakOk | continueOk check.openScope(s, "for") defer check.closeScope() check.simpleStmt(s.Init) if s.Cond != nil { var x operand check.expr(nil, &x, s.Cond)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.6K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
} return n case ir.ODEFER, ir.OGO: n := n.(*ir.GoDeferStmt) n.Call = typecheck(n.Call, ctxStmt|ctxExpr) tcGoDefer(n) return n case ir.OFOR: n := n.(*ir.ForStmt) return tcFor(n) case ir.OIF: n := n.(*ir.IfStmt) return tcIf(n) case ir.ORETURN: n := n.(*ir.ReturnStmt) return tcReturn(n) case ir.OTAILCALL:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0)