- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 31 for declStmt (0.33 sec)
-
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
case *ast.Comment: // nop case *ast.CommentGroup: // nop case *ast.CompositeLit: children = append(children, tok(n.Lbrace, len("{")), tok(n.Rbrace, len("{"))) case *ast.DeclStmt: // nop case *ast.DeferStmt: children = append(children, tok(n.Defer, len("defer"))) case *ast.Ellipsis: children = append(children, tok(n.Ellipsis, len("...")))
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/compile/internal/types2/labels.go
if jmp == bad { return true } } } return false } var stmtBranches func(syntax.Stmt) stmtBranches = func(s syntax.Stmt) { switch s := s.(type) { case *syntax.DeclStmt: for _, d := range s.DeclList { if d, _ := d.(*syntax.VarDecl); d != nil { recordVarDecl(d.Pos()) } } case *syntax.LabeledStmt: // declare non-blank label
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/walk.go
w.node(n.Label) w.node(n.Stmt) case *BlockStmt: w.stmtList(n.List) case *ExprStmt: w.node(n.X) case *SendStmt: w.node(n.Chan) w.node(n.Value) case *DeclStmt: w.declList(n.DeclList) case *AssignStmt: w.node(n.Lhs) if n.Rhs != nil { w.node(n.Rhs) } case *BranchStmt: if n.Label != nil { w.node(n.Label) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:55:04 UTC 2023 - 5.7K 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/cmd/compile/internal/syntax/nodes.go
List []Stmt Rbrace Pos stmt } ExprStmt struct { X Expr simpleStmt } SendStmt struct { Chan, Value Expr // Chan <- Value simpleStmt } DeclStmt struct { DeclList []Decl stmt } AssignStmt struct { Op Operator // 0 means no operation Lhs, Rhs Expr // Rhs == nil means Lhs++ (Op == Add) or Lhs-- (Op == Sub) simpleStmt }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 14:52:38 UTC 2023 - 9K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/branches.go
// list even if there are trailing empty statements; remove them. stmtList := trimTrailingEmptyStmts(body) for stmtIndex, stmt := range stmtList { lstmt = nil L: switch s := stmt.(type) { case *DeclStmt: for _, d := range s.DeclList { if v, ok := d.(*VarDecl); ok { recordVarDecl(v.Pos(), v.NameList[0]) break // the first VarDecl will do } } case *LabeledStmt:
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/go/types/stmt.go
inner := ctxt &^ (fallthroughOk | finalSwitchCase | inTypeSwitch) switch s := s.(type) { case *ast.BadStmt, *ast.EmptyStmt: // ignore case *ast.DeclStmt: check.declStmt(s.Decl) case *ast.LabeledStmt: check.hasLabel = true check.stmt(ctxt, s.Stmt) case *ast.ExprStmt: // spec: "With the exception of specific built-in functions,
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/vendor/golang.org/x/tools/go/cfg/builder.go
case *ast.ExprStmt: b.add(s) if call, ok := s.X.(*ast.CallExpr); ok && !b.mayReturn(call) { // Calls to panic, os.Exit, etc, never return. b.current = b.newBlock(KindUnreachable, s) } case *ast.DeclStmt: // Treat each var ValueSpec as a separate statement. d := s.Decl.(*ast.GenDecl) if d.Tok == token.VAR { for _, spec := range d.Specs { if spec, ok := spec.(*ast.ValueSpec); ok { b.add(spec) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 11.4K bytes - Viewed (0) -
src/cmd/cgo/ast.go
case *ast.MapType: f.walk(&n.Key, ctxType, visit) f.walk(&n.Value, ctxType, visit) case *ast.ChanType: f.walk(&n.Value, ctxType, visit) case *ast.BadStmt: case *ast.DeclStmt: f.walk(n.Decl, ctxDecl, visit) case *ast.EmptyStmt: case *ast.LabeledStmt: f.walk(n.Stmt, ctxStmt, visit) case *ast.ExprStmt: f.walk(&n.X, ctxExpr, visit) case *ast.SendStmt:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 07 16:54:27 UTC 2023 - 14.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go
a.apply(n, "Key", nil, n.Key) a.apply(n, "Value", nil, n.Value) case *ast.ChanType: a.apply(n, "Value", nil, n.Value) // Statements case *ast.BadStmt: // nothing to do case *ast.DeclStmt: a.apply(n, "Decl", nil, n.Decl) case *ast.EmptyStmt: // nothing to do case *ast.LabeledStmt: a.apply(n, "Label", nil, n.Label) a.apply(n, "Stmt", nil, n.Stmt) case *ast.ExprStmt:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 12.2K bytes - Viewed (0)