- Sort Score
- Result 10 results
- Languages All
Results 11 - 15 of 15 for KeyValueExpr (0.43 sec)
-
src/go/ast/filter.go
func filterExprList(list []Expr, filter Filter, export bool) []Expr { j := 0 for _, exp := range list { switch x := exp.(type) { case *CompositeLit: filterCompositeLit(x, filter, export) case *KeyValueExpr: if x, ok := x.Key.(*Ident); ok && !filter(x.Name) { continue } if x, ok := x.Value.(*CompositeLit); ok { filterCompositeLit(x, filter, export) } } list[j] = exp j++
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 13.3K bytes - Viewed (0) -
src/go/doc/example.go
// (For an expression like fmt.Println, only add "fmt" to the // set of unresolved names, not "Println".) ast.Inspect(e.X, inspectFunc) return false case *ast.KeyValueExpr: // For key value expressions, only inspect the value // as the key should be resolved by the type of the // composite literal. ast.Inspect(e.Value, inspectFunc) return false } return true
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/go/parser/parser_test.go
{name: "maplit", format: "package main; var x = «map[int]any{1:«nil»}»", parseMultiplier: 2}, // Parser nodes: CompositeLit, KeyValueExpr {name: "dot", format: "package main; var x = «x.»x"}, {name: "index", format: "package main; var x = x«[1]»"}, {name: "slice", format: "package main; var x = x«[1:2]»"},
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/cmd/compile/internal/syntax/parser.go
p.xnest++ p.want(_Lbrace) x.Rbrace = p.list("composite literal", _Comma, _Rbrace, func() bool { // value e := p.bare_complitexpr() if p.tok == _Colon { // key ':' value l := new(KeyValueExpr) l.pos = p.pos() p.next() l.Key = e l.Value = p.bare_complitexpr() e = l x.NKeys++ } x.ElemList = append(x.ElemList, e) return false }) p.xnest--
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/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"InterfaceType.Interface", Field, 0}, {"InterfaceType.Methods", Field, 0}, {"IsExported", Func, 0}, {"IsGenerated", Func, 21}, {"KeyValueExpr", Type, 0}, {"KeyValueExpr.Colon", Field, 0}, {"KeyValueExpr.Key", Field, 0}, {"KeyValueExpr.Value", Field, 0}, {"LabeledStmt", Type, 0}, {"LabeledStmt.Colon", Field, 0}, {"LabeledStmt.Label", Field, 0}, {"LabeledStmt.Stmt", Field, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)