- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 36 for LabeledStmt (0.24 sec)
-
src/go/types/labels.go
parent *block // enclosing block lstmt *ast.LabeledStmt // labeled statement to which this block belongs, or nil labels map[string]*ast.LabeledStmt // allocated lazily } // insert records a new label declaration for the current block. // The label must not have been declared before in any block. func (b *block) insert(s *ast.LabeledStmt) { name := s.Label.Name if debug {
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/cmd/compile/internal/types2/labels.go
parent *block // enclosing block lstmt *syntax.LabeledStmt // labeled statement to which this block belongs, or nil labels map[string]*syntax.LabeledStmt // allocated lazily } // insert records a new label declaration for the current block. // The label must not have been declared before in any block. func (b *block) insert(s *syntax.LabeledStmt) { name := s.Label.Value if debug {
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/cmd/compile/internal/syntax/branches.go
} type label struct { parent *block // block containing this label declaration lstmt *LabeledStmt // statement declaring the label used bool // whether the label is used or not } type block struct { parent *block // immediately enclosing block, or nil start Pos // start of block lstmt *LabeledStmt // labeled statement associated with this block, or nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Jun 26 00:21:29 UTC 2022 - 9.8K bytes - Viewed (0) -
src/cmd/compile/internal/types2/return.go
switch s := s.(type) { default: panic("unreachable") case *syntax.DeclStmt, *syntax.EmptyStmt, *syntax.SendStmt, *syntax.AssignStmt, *syntax.CallStmt: // no chance case *syntax.LabeledStmt: return check.isTerminating(s.Stmt, s.Label.Value) case *syntax.ExprStmt: // calling the predeclared (possibly parenthesized) panic() function is terminating
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 4.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go
} if stmt != nil { d.hasBreak[stmt] = true } } case *ast.IfStmt: d.findLabels(x.Body) if x.Else != nil { d.findLabels(x.Else) } case *ast.LabeledStmt: d.labels[x.Label.Name] = x.Stmt d.findLabels(x.Stmt) // These cases are all the same, but the x.Body only works // when the specific type of x is known, so the cases cannot // be merged.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 01:28:01 UTC 2023 - 7.6K bytes - Viewed (0) -
src/go/types/return.go
default: panic("unreachable") case *ast.BadStmt, *ast.DeclStmt, *ast.EmptyStmt, *ast.SendStmt, *ast.IncDecStmt, *ast.AssignStmt, *ast.GoStmt, *ast.DeferStmt, *ast.RangeStmt: // no chance case *ast.LabeledStmt: return check.isTerminating(s.Stmt, s.Label.Name) case *ast.ExprStmt: // calling the predeclared (possibly parenthesized) panic() function is terminating
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 4.2K bytes - Viewed (0) -
src/go/ast/scope.go
// the [types.Info] struct for details. type Object struct { Kind ObjKind Name string // declared name Decl any // corresponding Field, XxxSpec, FuncDecl, LabeledStmt, AssignStmt, Scope; or nil Data any // object-specific data; or nil Type any // placeholder for type information; may be nil } // NewObj creates a new object of a given kind and name.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 4.6K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/nodes_test.go
{"Field", `@x T`}, {"Field", `@x *(T)`}, {"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@()`},
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/cmd/compile/internal/syntax/positions.go
// case *DotsType: // 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:
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/vendor/golang.org/x/tools/go/analysis/passes/loopclosure/loopclosure.go
// unlabel returns the inner statement for the possibly labeled statement stmt, // stripping any (possibly nested) *ast.LabeledStmt wrapper. // // The second result reports whether stmt was an *ast.LabeledStmt. func unlabel(stmt ast.Stmt) (ast.Stmt, bool) { labeled := false for { labelStmt, ok := stmt.(*ast.LabeledStmt) if !ok { return stmt, labeled } labeled = true stmt = labelStmt.Stmt } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 10.3K bytes - Viewed (0)