- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 56 for IndexExpr (0.11 sec)
-
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/nilfunc/nilfunc.go
var obj types.Object switch v := e2.(type) { case *ast.Ident: obj = pass.TypesInfo.Uses[v] case *ast.SelectorExpr: obj = pass.TypesInfo.Uses[v.Sel] case *ast.IndexExpr, *ast.IndexListExpr: // Check generic functions such as "f[T1,T2]". x, _, _, _ := typeparams.UnpackIndexExpr(v) if id, ok := x.(*ast.Ident); ok { obj = pass.TypesInfo.Uses[id] } default: return
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 2K bytes - Viewed (0) -
src/cmd/compile/internal/walk/expr.go
n.X = walkExpr(n.X, init) return n case ir.ODIV, ir.OMOD: n := n.(*ir.BinaryExpr) return walkDivMod(n, init) case ir.OINDEX: n := n.(*ir.IndexExpr) return walkIndex(n, init) case ir.OINDEXMAP: n := n.(*ir.IndexExpr) return walkIndexMap(n, init) case ir.ORECV: base.Fatalf("walkExpr ORECV") // should see inside OAS only panic("unreachable") case ir.OSLICEHEADER:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:01 UTC 2024 - 27.6K bytes - Viewed (0) -
src/cmd/compile/internal/walk/order.go
a.X = l return typecheck.Expr(a) case ir.OINDEX, ir.OINDEXMAP: n := n.(*ir.IndexExpr) var l ir.Node if n.X.Type().IsArray() { l = o.safeExpr(n.X) } else { l = o.cheapExpr(n.X) } r := o.cheapExpr(n.Index) if l == n.X && r == n.Index { return n } a := ir.Copy(n).(*ir.IndexExpr) a.X = l a.Index = r return typecheck.Expr(a) default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 02:00:33 UTC 2024 - 42.7K bytes - Viewed (0) -
src/cmd/compile/internal/walk/assign.go
left, right = n.X, n.Y } // Recognize m[k] = append(m[k], ...) so we can reuse // the mapassign call. var mapAppend *ir.CallExpr if left.Op() == ir.OINDEXMAP && right.Op() == ir.OAPPEND { left := left.(*ir.IndexExpr) mapAppend = right.(*ir.CallExpr) if !ir.SameSafeExpr(left, mapAppend.Args[0]) { base.Fatalf("not same expressions: %v != %v", left, mapAppend.Args[0]) } } left = walkExpr(left, init)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:09:06 UTC 2024 - 20.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go
case *ast.Ident: return 1 << nIdent case *ast.IfStmt: return 1 << nIfStmt case *ast.ImportSpec: return 1 << nImportSpec case *ast.IncDecStmt: return 1 << nIncDecStmt case *ast.IndexExpr: return 1 << nIndexExpr case *ast.IndexListExpr: return 1 << nIndexListExpr case *ast.InterfaceType: return 1 << nInterfaceType case *ast.KeyValueExpr: return 1 << nKeyValueExpr
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 4.8K bytes - Viewed (0) -
src/go/types/exprstring.go
case *ast.ParenExpr: buf.WriteByte('(') WriteExpr(buf, x.X) buf.WriteByte(')') case *ast.SelectorExpr: WriteExpr(buf, x.X) buf.WriteByte('.') buf.WriteString(x.Sel.Name) case *ast.IndexExpr, *ast.IndexListExpr: ix := typeparams.UnpackIndexExpr(x) WriteExpr(buf, ix.X) buf.WriteByte('[') writeExprList(buf, ix.Indices) buf.WriteByte(']') case *ast.SliceExpr: WriteExpr(buf, x.X)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 08 19:31:44 UTC 2024 - 4.8K bytes - Viewed (0) -
src/go/types/call.go
// unchanged. // // If an error (other than a version error) occurs in any case, it is reported // and x.mode is set to invalid. func (check *Checker) funcInst(T *target, pos token.Pos, x *operand, ix *typeparams.IndexExpr, infer bool) ([]Type, []ast.Expr) { assert(T != nil || ix != nil) var instErrPos positioner if ix != nil { instErrPos = inNode(ix.Orig, ix.Lbrack)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 33.5K bytes - Viewed (0) -
src/go/ast/ast.go
} // A SelectorExpr node represents an expression followed by a selector. SelectorExpr struct { X Expr // expression Sel *Ident // field selector } // An IndexExpr node represents an expression followed by an index. IndexExpr struct { X Expr // expression Lbrack token.Pos // position of "[" Index Expr // index expression Rbrack 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/cmd/compile/internal/types2/struct.go
// *T is valid, but **T is not if op, _ := base.(*syntax.Operation); op == nil || ptrBase(op) == nil { return embeddedFieldIdent(e.X) } } case *syntax.SelectorExpr: return e.Sel case *syntax.IndexExpr: return embeddedFieldIdent(e.X) } return nil // invalid embedded field } func (check *Checker) declareInSet(oset *objset, pos syntax.Pos, obj Object) bool { if alt := oset.insert(obj); alt != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 6.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
tok(n.If, len("if"))) case *ast.ImportSpec: // TODO(adonovan): ImportSpec.{Doc,EndPos}? case *ast.IncDecStmt: children = append(children, tok(n.TokPos, len(n.Tok.String()))) case *ast.IndexExpr: children = append(children, tok(n.Lbrack, len("[")), tok(n.Rbrack, len("]"))) case *ast.IndexListExpr: children = append(children, tok(n.Lbrack, len("[")), tok(n.Rbrack, 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)