- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for BlockStmt (0.19 sec)
-
src/go/ast/ast.go
TokPos token.Pos // position of Tok Tok token.Token // keyword token (BREAK, CONTINUE, GOTO, FALLTHROUGH) Label *Ident // label name; or nil } // A BlockStmt node represents a braced statement list. BlockStmt struct { Lbrace token.Pos // position of "{" List []Stmt Rbrace token.Pos // position of "}", if any (may be absent due to syntax error) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 35.6K bytes - Viewed (0) -
src/cmd/compile/internal/rangefunc/rewrite.go
// A rewriter implements rewriting the range-over-funcs in a given function. type rewriter struct { pkg *types2.Package info *types2.Info sig *types2.Signature outer *syntax.FuncType body *syntax.BlockStmt // References to important types and values. any types2.Object bool types2.Object int types2.Object true types2.Object false types2.Object // Branch numbering, computed as needed.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 41.6K bytes - Viewed (0) -
src/go/parser/parser_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 20:26:14 UTC 2024 - 24.6K bytes - Viewed (0) -
src/go/doc/example.go
} // stripOutputComment finds and removes the "Output:" or "Unordered output:" // comment from body and comments, and adjusts the body block's end position. func stripOutputComment(body *ast.BlockStmt, comments []*ast.CommentGroup) (*ast.BlockStmt, []*ast.CommentGroup) { // Do nothing if there is no "Output:" or "Unordered output:" comment. i, last := lastComment(body, comments) if last == nil || !outputPrefix.MatchString(last.Text()) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 21.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
// z-assignment statement, because it spans three of its children (:=, // x, +). So too is the 1-char interval D, because it contains only // interior whitespace of the assignment. E is considered interior // whitespace of the BlockStmt containing the assignment. // // The resulting path is never empty; it always contains at least the // 'root' *ast.File. Ideally PathEnclosingInterval would reject
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 15.9K bytes - Viewed (0) -
src/cmd/cover/cover.go
// we inserted above. pos := f.fset.File(n.Body.End()).Pos(elseOffset + 4) switch stmt := n.Else.(type) { case *ast.IfStmt: block := &ast.BlockStmt{ Lbrace: pos, List: []ast.Stmt{stmt}, Rbrace: stmt.End(), } n.Else = block case *ast.BlockStmt: stmt.Lbrace = pos default: panic("unexpected node type in if") } ast.Walk(f, n.Else) return nil case *ast.SelectStmt:
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/vendor/golang.org/x/tools/go/analysis/passes/loopclosure/loopclosure.go
addVar := func(expr ast.Expr) { if id, _ := expr.(*ast.Ident); id != nil { if obj := pass.TypesInfo.ObjectOf(id); obj != nil { vars = append(vars, obj) } } } var body *ast.BlockStmt switch n := n.(type) { case *ast.File: // Only traverse the file if its goversion is strictly before go1.22. goversion := versions.FileVersion(pass.TypesInfo, n)
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/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/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)