- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 43 for Elts (0.05 sec)
-
src/go/ast/walk.go
case *Ellipsis: if n.Elt != nil { Walk(v, n.Elt) } case *FuncLit: Walk(v, n.Type) Walk(v, n.Body) case *CompositeLit: if n.Type != nil { Walk(v, n.Type) } walkList(v, n.Elts) case *ParenExpr: Walk(v, n.X) case *SelectorExpr: Walk(v, n.X) Walk(v, n.Sel) case *IndexExpr: Walk(v, n.X) Walk(v, n.Index) case *IndexListExpr: Walk(v, n.X)
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/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go
} } } } // checkCopyLocksCompositeLit detects lock copy inside a composite literal func checkCopyLocksCompositeLit(pass *analysis.Pass, cl *ast.CompositeLit) { for _, x := range cl.Elts { if node, ok := x.(*ast.KeyValueExpr); ok { x = node.Value } if path := lockPathRhs(pass, x); path != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 9.9K bytes - Viewed (0) -
src/go/printer/testdata/parser.go
if p.trace { defer un(trace(p, "LiteralValue")) } lbrace := p.expect(token.LBRACE) var elts []ast.Expr p.exprLev++ if p.tok != token.RBRACE { elts = p.parseElementList() } p.exprLev-- rbrace := p.expect(token.RBRACE) return &ast.CompositeLit{typ, lbrace, elts, rbrace} } // checkExpr checks that x is an expression (and not a type).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 20:19:51 UTC 2023 - 50.5K bytes - Viewed (0) -
src/cmd/cgo/ast.go
f.walk(&n.Elt, ctxType, visit) case *ast.BasicLit: case *ast.FuncLit: f.walk(n.Type, ctxType, visit) f.walk(n.Body, ctxStmt, visit) case *ast.CompositeLit: f.walk(&n.Type, ctxType, visit) f.walk(n.Elts, ctxExpr, visit) case *ast.ParenExpr: f.walk(&n.X, context, visit) case *ast.SelectorExpr: f.walk(&n.X, ctxSelector, visit) case *ast.IndexExpr: f.walk(&n.X, ctxExpr, visit)
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, "Elt", nil, n.Elt) case *ast.FuncLit: a.apply(n, "Type", nil, n.Type) a.apply(n, "Body", nil, n.Body) case *ast.CompositeLit: a.apply(n, "Type", nil, n.Type) a.applyList(n, "Elts") case *ast.ParenExpr: a.apply(n, "X", nil, n.X) case *ast.SelectorExpr: a.apply(n, "X", nil, n.X) a.apply(n, "Sel", nil, n.Sel) case *ast.IndexExpr: a.apply(n, "X", nil, n.X)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 12.2K bytes - Viewed (0) -
src/go/parser/parser.go
defer un(trace(p, "LiteralValue")) } lbrace := p.expect(token.LBRACE) var elts []ast.Expr p.exprLev++ if p.tok != token.RBRACE { elts = p.parseElementList() } p.exprLev-- rbrace := p.expectClosing(token.RBRACE, "composite literal") return &ast.CompositeLit{Type: typ, Lbrace: lbrace, Elts: elts, Rbrace: rbrace} } func (p *parser) parsePrimaryExpr(x ast.Expr) ast.Expr {
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/ast/ast.go
CompositeLit struct { Type Expr // literal type; or nil Lbrace token.Pos // position of "{" Elts []Expr // list of composite elements; or nil Rbrace token.Pos // position of "}" Incomplete bool // true if (source) expressions are missing in the Elts list } // A ParenExpr node represents a parenthesized expression. ParenExpr struct { Lparen token.Pos // position of "("
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/go/parser/resolver.go
case *ast.FuncType: r.openScope(n.Pos()) defer r.closeScope() r.walkFuncType(n) case *ast.CompositeLit: if n.Type != nil { ast.Walk(r, n.Type) } for _, e := range n.Elts { if kv, _ := e.(*ast.KeyValueExpr); kv != nil { // See go.dev/issue/45160: try to resolve composite lit keys, but don't // collect them as unresolved if resolution failed. This replicates
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/go/printer/printer_test.go
panic(err) } // Replace the result with call(), which is on the next line. fd := file.Decls[0].(*ast.FuncDecl) ret := fd.Body.List[0].(*ast.ReturnStmt) ret.Results[0] = ret.Results[0].(*ast.CompositeLit).Elts[0] var buf bytes.Buffer if err := Fprint(&buf, fset, ret); err != nil { t.Fatal(err) } want := "return call()" if got := buf.String(); got != want { t.Fatalf("got %q, want %q", got, want) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 20.4K bytes - Viewed (0) -
src/go/printer/nodes.go
p.exprList(x.Lbrace, x.Elts, 1, commaTerm, x.Rbrace, x.Incomplete) // do not insert extra line break following a /*-style comment // before the closing '}' as it might break the code if there // is no trailing ',' mode := noExtraLinebreak // do not insert extra blank following a /*-style comment // before the closing '}' unless the literal is empty if len(x.Elts) > 0 { mode |= noExtraBlank }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0)