- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for BlockStmt (0.48 sec)
-
src/cmd/compile/internal/syntax/positions.go
// case *StructType: // case *Field: // case *InterfaceType: // case *FuncType: // case *MapType: // case *ChanType: // statements // case *EmptyStmt: // case *LabeledStmt: // case *BlockStmt: // case *ExprStmt: case *SendStmt: m = n.Chan // case *DeclStmt: case *AssignStmt: m = n.Lhs // case *BranchStmt: // case *CallStmt: // case *ReturnStmt: // case *IfStmt:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 17:49:19 UTC 2024 - 6.5K 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/cmd/compile/internal/types2/labels.go
package types2 import ( "cmd/compile/internal/syntax" . "internal/types/errors" ) // labels checks correct label use in body. func (check *Checker) labels(body *syntax.BlockStmt) { // set of all labels in this body all := NewScope(nil, body.Pos(), syntax.EndPos(body), "label") fwdJumps := check.blockBranches(all, nil, nil, body.List)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 7.2K bytes - Viewed (0) -
src/go/types/labels.go
package types import ( "go/ast" "go/token" . "internal/types/errors" ) // labels checks correct label use in body. func (check *Checker) labels(body *ast.BlockStmt) { // set of all labels in this body all := NewScope(nil, body.Pos(), body.End(), "label") fwdJumps := check.blockBranches(all, nil, nil, body.List) // If there are any forward jumps left, no label was found for
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 7.2K 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/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/compile/internal/syntax/parser.go
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/go/ast/example_test.go
// 19 . . . . Params: *ast.FieldList { // 20 . . . . . Opening: 3:10 // 21 . . . . . Closing: 3:11 // 22 . . . . } // 23 . . . } // 24 . . . Body: *ast.BlockStmt { // 25 . . . . Lbrace: 3:13 // 26 . . . . List: []ast.Stmt (len = 1) { // 27 . . . . . 0: *ast.ExprStmt { // 28 . . . . . . X: *ast.CallExpr {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:44:50 UTC 2024 - 6.1K 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)