- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 42 for BlockStmt (0.14 sec)
-
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go
// node, along with the number of call expressions encountered. func restOfBlock(stack []ast.Node) ([]ast.Stmt, int) { var ncalls int for i := len(stack) - 1; i >= 0; i-- { if b, ok := stack[i].(*ast.BlockStmt); ok { for j, v := range b.List { if v == stack[i+1] { return b.List[j:], ncalls } } break } if _, ok := stack[i].(*ast.CallExpr); ok { ncalls++ } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 5K bytes - Viewed (0) -
src/go/types/api.go
// The Scopes mapping does not contain an entry for the // function body ([*ast.BlockStmt]); the function's scope is // associated with the [*ast.FuncType]. // // The following node types may appear in Scopes: // // *ast.File // *ast.FuncType // *ast.TypeSpec // *ast.BlockStmt // *ast.IfStmt // *ast.SwitchStmt // *ast.TypeSwitchStmt // *ast.CaseClause
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/cmd/compile/internal/types2/api.go
// The Scopes mapping does not contain an entry for the // function body ([*ast.BlockStmt]); the function's scope is // associated with the [*ast.FuncType]. // // The following node types may appear in Scopes: // // *syntax.File // *syntax.FuncType // *syntax.TypeDecl // *syntax.BlockStmt // *syntax.IfStmt // *syntax.SwitchStmt // *syntax.CaseClause
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/ast/walk.go
Walk(v, n.Call) case *DeferStmt: Walk(v, n.Call) case *ReturnStmt: walkList(v, n.Results) case *BranchStmt: if n.Label != nil { Walk(v, n.Label) } case *BlockStmt: walkList(v, n.List) case *IfStmt: if n.Init != nil { Walk(v, n.Init) } Walk(v, n.Cond) Walk(v, n.Body) if n.Else != nil { Walk(v, n.Else) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:34:10 UTC 2024 - 6.4K bytes - Viewed (0) -
src/go/parser/parser.go
return } func (p *parser) parseBody() *ast.BlockStmt { if p.trace { defer un(trace(p, "Body")) } lbrace := p.expect(token.LBRACE) list := p.parseStmtList() rbrace := p.expect2(token.RBRACE) return &ast.BlockStmt{Lbrace: lbrace, List: list, Rbrace: rbrace} } func (p *parser) parseBlockStmt() *ast.BlockStmt { if p.trace { defer un(trace(p, "BlockStmt")) }
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/go/parser/resolver.go
// add to list of unresolved targets if n.Tok != token.FALLTHROUGH && n.Label != nil { depth := len(r.targetStack) - 1 r.targetStack[depth] = append(r.targetStack[depth], n.Label) } case *ast.BlockStmt: r.openScope(n.Pos()) defer r.closeScope() r.walkStmts(n.List) case *ast.IfStmt: r.openScope(n.Pos()) defer r.closeScope() if n.Init != nil { ast.Walk(r, n.Init) }
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/syntax/nodes_test.go
{"Field", `@x, y, z T`}, {"Field", `@x, y, z (*T)`}, } var stmts = []test{ {"EmptyStmt", `@`}, {"LabeledStmt", `L@:`}, {"LabeledStmt", `L@: ;`}, {"LabeledStmt", `L@: f()`}, {"BlockStmt", `@{}`}, // The position of an ExprStmt is the position of the expression. {"ExprStmt", `@<-ch`}, {"ExprStmt", `f@()`}, {"ExprStmt", `append@(s, 1, 2, 3)`}, {"SendStmt", `ch @<- x`},
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/go/types/stmt.go
package types import ( "go/ast" "go/constant" "go/token" "internal/buildcfg" . "internal/types/errors" "sort" ) func (check *Checker) funcBody(decl *declInfo, name string, sig *Signature, body *ast.BlockStmt, iota constant.Value) { if check.conf.IgnoreFuncBodies { panic("function body not ignored") } if check.conf._Trace { check.trace(body.Pos(), "-- %s: %s", name, sig) }
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/go/printer/nodes.go
} line++ t = lt.Stmt } i++ } } if nindent > 0 { p.print(unindent) } } // block prints an *ast.BlockStmt; it always spans at least two lines. func (p *printer) block(b *ast.BlockStmt, nindent int) { p.setPos(b.Lbrace) p.print(token.LBRACE) p.stmtList(b.List, nindent, true) p.linebreak(p.lineFor(b.Rbrace), 1, ignore, true) p.setPos(b.Rbrace)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/stmt.go
import ( "cmd/compile/internal/syntax" "go/constant" "internal/buildcfg" . "internal/types/errors" "sort" ) func (check *Checker) funcBody(decl *declInfo, name string, sig *Signature, body *syntax.BlockStmt, iota constant.Value) { if check.conf.IgnoreFuncBodies { panic("function body not ignored") } if check.conf.Trace { check.trace(body.Pos(), "-- %s: %s", name, sig) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.7K bytes - Viewed (0)