- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 247 for elts (0.05 sec)
-
src/go/ast/filter.go
removedFields = true } fields.List = list[0:j] return } func filterCompositeLit(lit *CompositeLit, filter Filter, export bool) { n := len(lit.Elts) lit.Elts = filterExprList(lit.Elts, filter, export) if len(lit.Elts) < n { lit.Incomplete = true } } func filterExprList(list []Expr, filter Filter, export bool) []Expr { j := 0 for _, exp := range list {
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/types/expr.go
goto Error } if len(e.Elts) == 0 { break } // Convention for error messages on invalid struct literals: // we mention the struct type only if it clarifies the error // (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
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 49.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/python/op_reg_gen.py
def visit_Constant(self, node): return node.value def visit_keyword(self, node): return node.arg, self.visit(node.value) def visit_List(self, node): return [self.visit(cst) for cst in node.elts] def visit_arguments(self, node): return [self.visit(arg) for arg in node.args] def visit_FunctionDef(self, node): # TODO(fengliuai): create one utility method to match different apis and
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Sep 28 21:37:05 UTC 2021 - 5K bytes - Viewed (0) -
src/go/types/exprstring.go
case *ast.Ellipsis: buf.WriteString("...") if x.Elt != nil { WriteExpr(buf, x.Elt) } case *ast.BasicLit: buf.WriteString(x.Value) case *ast.FuncLit: buf.WriteByte('(') WriteExpr(buf, x.Type) buf.WriteString(" literal)") // shortened case *ast.CompositeLit: WriteExpr(buf, x.Type) buf.WriteByte('{') if len(x.Elts) > 0 { buf.WriteString("…") } buf.WriteByte('}')
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 08 19:31:44 UTC 2024 - 4.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/python/tfr_gen.py
'\n{} = shape.size_to_index {} : !shape.size'.format(elt, size_), node) return (elt, TFRTypes.INDEX) def visit_List(self, node): out_type = self._get_inferred_type(node) vals = [] tys = [] for elt in node.elts: val, ty = self.visit(elt) ty = self._get_inferred_type(elt, ty) if ty in _ATTRIBUTE_TYPES and out_type == TFRTypes.TENSOR_LIST:
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 27 15:27:03 UTC 2022 - 55.8K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
var kv *ir.KeyExpr if elt.Op() == ir.OKEY { elt := elt.(*ir.KeyExpr) elt.Key = Expr(elt.Key) key = IndexConst(elt.Key) if key < 0 { base.Fatalf("invalid index: %v", elt.Key) } kv = elt r = elt.Value } r = Expr(r) r = AssignConv(r, elemType, ctx) if kv != nil { kv.Value = r } else { elts[i] = r } if key >= 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0) -
src/cmd/fix/typecheck.go
for _, e := range n.Elts { if kv, ok := e.(*ast.KeyValueExpr); ok { if typeof[kv.Key] == "" { typeof[kv.Key] = kt } if typeof[kv.Value] == "" { typeof[kv.Value] = vt } } } } } if typ := cfg.Type[t]; typ != nil && len(typ.Field) > 0 { // struct for _, e := range n.Elts { if kv, ok := e.(*ast.KeyValueExpr); ok {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 16 22:02:42 UTC 2022 - 20.1K bytes - Viewed (0) -
src/go/ast/walk.go
// Expressions case *BadExpr, *Ident, *BasicLit: // nothing to do 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)
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/cmd/fix/fix.go
} case *ast.BadExpr: case *ast.Ident: case *ast.Ellipsis: walkBeforeAfter(&n.Elt, before, after) case *ast.BasicLit: case *ast.FuncLit: walkBeforeAfter(&n.Type, before, after) walkBeforeAfter(&n.Body, before, after) case *ast.CompositeLit: walkBeforeAfter(&n.Type, before, after) walkBeforeAfter(&n.Elts, before, after) case *ast.ParenExpr: walkBeforeAfter(&n.X, before, after)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 14.6K bytes - Viewed (0)