- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 49 for forStmt (0.15 sec)
-
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/go/printer/testdata/parser.go
p.expectSemi() body := &ast.BlockStmt{lbrace, list, rbrace} return &ast.SelectStmt{pos, body} } func (p *parser) parseForStmt() ast.Stmt { if p.trace { defer un(trace(p, "ForStmt")) } pos := p.expect(token.FOR) p.openScope() defer p.closeScope() var s1, s2, s3 ast.Stmt if p.tok != token.LBRACE { prevLev := p.exprLev p.exprLev = -1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 20:19:51 UTC 2023 - 50.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) -
src/go/parser/parser.go
body := &ast.BlockStmt{Lbrace: lbrace, List: list, Rbrace: rbrace} return &ast.SelectStmt{Select: pos, Body: body} } func (p *parser) parseForStmt() ast.Stmt { if p.trace { defer un(trace(p, "ForStmt")) } pos := p.expect(token.FOR) var s1, s2, s3 ast.Stmt var isRange bool if p.tok != token.LBRACE { prevLev := p.exprLev p.exprLev = -1 if p.tok != token.SEMICOLON {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 08 20:07:50 UTC 2023 - 72.2K bytes - Viewed (0) -
src/cmd/compile/internal/walk/order.go
o.out = append(o.out, n) o.popTemp(t) // Clean temporaries from condition evaluation at // beginning of loop body and after for statement. case ir.OFOR: n := n.(*ir.ForStmt) t := o.markTemp() n.Cond = o.exprInPlace(n.Cond) orderBlock(&n.Body, o.free) n.Post = orderStmtInPlace(n.Post, o.free) o.out = append(o.out, n) o.popTemp(t)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 02:00:33 UTC 2024 - 42.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"FilterImportDuplicates", Const, 0}, {"FilterPackage", Func, 0}, {"FilterUnassociatedComments", Const, 0}, {"ForStmt", Type, 0}, {"ForStmt.Body", Field, 0}, {"ForStmt.Cond", Field, 0}, {"ForStmt.For", Field, 0}, {"ForStmt.Init", Field, 0}, {"ForStmt.Post", Field, 0}, {"Fprint", Func, 0}, {"Fun", Const, 0}, {"FuncDecl", Type, 0}, {"FuncDecl.Body", Field, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/rulegen.go
u.node(node.Decl) case *ast.IfStmt: if node.Init != nil { u.node(node.Init) } u.node(node.Cond) u.node(node.Body) if node.Else != nil { u.node(node.Else) } case *ast.ForStmt: if node.Init != nil { u.node(node.Init) } if node.Cond != nil { u.node(node.Cond) } if node.Post != nil { u.node(node.Post) } u.node(node.Body) case *ast.SwitchStmt:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Sep 02 22:09:21 UTC 2023 - 48.7K bytes - Viewed (0)