- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for KeyValueExpr (0.12 sec)
-
src/go/types/expr.go
// (e.g., a duplicate field error doesn't need the struct type). fields := utyp.fields if _, ok := e.Elts[0].(*ast.KeyValueExpr); ok { // all elements must have keys visited := make([]bool, len(fields)) for _, e := range e.Elts { kv, _ := e.(*ast.KeyValueExpr) if kv == nil { check.error(e, MixedStructLit, "mixture of field:value and value elements in struct literal") continue
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 49.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/expr.go
// (e.g., a duplicate field error doesn't need the struct type). fields := utyp.fields if _, ok := e.ElemList[0].(*syntax.KeyValueExpr); ok { // all elements must have keys visited := make([]bool, len(fields)) for _, e := range e.ElemList { kv, _ := e.(*syntax.KeyValueExpr) if kv == nil { check.error(e, MixedStructLit, "mixture of field:value and value elements in struct literal")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 51.7K 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)