- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 49 for forStmt (0.14 sec)
-
src/cmd/cover/cover.go
case *ast.IfStmt: found, pos := hasFuncLiteral(s.Init) if found { return pos } found, pos = hasFuncLiteral(s.Cond) if found { return pos } return s.Body.Lbrace case *ast.ForStmt: found, pos := hasFuncLiteral(s.Init) if found { return pos } found, pos = hasFuncLiteral(s.Cond) if found { return pos } found, pos = hasFuncLiteral(s.Post) if found {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 34.5K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/parser.go
s := new(DeclStmt) s.pos = p.pos() p.next() // _Const, _Type, or _Var s.DeclList = p.appendGroup(nil, f) return s } func (p *parser) forStmt() Stmt { if trace { defer p.trace("forStmt")() } s := new(ForStmt) s.pos = p.pos() s.Init, s.Cond, s.Post = p.header(_For) s.Body = p.blockStmt("for clause") return s }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 62.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go
// Check if the enclosing statement is inside another node. switch expr := path[enclosingIndex+1].(type) { case *ast.IfStmt: // Get the base if statement. return baseIfStmt(path, enclosingIndex+1) case *ast.ForStmt: if expr.Init == enclosingStmt || expr.Post == enclosingStmt { return expr } } return enclosingStmt.(ast.Stmt) } // baseIfStmt walks up the if/else-if chain until we get to
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 11.7K bytes - Viewed (0) -
src/cmd/cgo/ast.go
f.walk(n.Body, ctxTypeSwitch, visit) case *ast.CommClause: f.walk(n.Comm, ctxStmt, visit) f.walk(n.Body, ctxStmt, visit) case *ast.SelectStmt: f.walk(n.Body, ctxStmt, visit) case *ast.ForStmt: f.walk(n.Init, ctxStmt, visit) f.walk(&n.Cond, ctxExpr, visit) f.walk(n.Post, ctxStmt, visit) f.walk(n.Body, ctxStmt, visit) case *ast.RangeStmt: f.walk(&n.Key, ctxExpr, visit)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 07 16:54:27 UTC 2023 - 14.3K bytes - Viewed (0) -
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/fix/fix.go
case *ast.CommClause: walkBeforeAfter(&n.Comm, before, after) walkBeforeAfter(&n.Body, before, after) case *ast.SelectStmt: walkBeforeAfter(&n.Body, before, after) case *ast.ForStmt: walkBeforeAfter(&n.Init, before, after) walkBeforeAfter(&n.Cond, before, after) walkBeforeAfter(&n.Post, before, after) walkBeforeAfter(&n.Body, before, after) case *ast.RangeStmt:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 14.6K 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)