- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for TypeAssertExpr (0.17 sec)
-
src/go/ast/ast.go
Max Expr // maximum capacity of slice; or nil Slice3 bool // true if 3-index slice (2 colons present) Rbrack token.Pos // position of "]" } // A TypeAssertExpr node represents an expression followed by a // type assertion. // TypeAssertExpr struct { X Expr // expression Lparen token.Pos // position of "(" Type Expr // asserted type; nil means type switch X.(type)
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/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
case *ast.StructType: children = append(children, tok(n.Struct, len("struct"))) case *ast.SwitchStmt: children = append(children, tok(n.Switch, len("switch"))) case *ast.TypeAssertExpr: children = append(children, tok(n.Lparen-1, len(".")), tok(n.Lparen, len("(")), tok(n.Rparen, len(")"))) case *ast.TypeSpec: // TODO(adonovan): TypeSpec.{Doc,Comment}?
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 15.9K bytes - Viewed (0) -
src/cmd/fix/fix.go
walkBeforeAfter(&n.X, before, after) if n.Low != nil { walkBeforeAfter(&n.Low, before, after) } if n.High != nil { walkBeforeAfter(&n.High, before, after) } case *ast.TypeAssertExpr: walkBeforeAfter(&n.X, before, after) walkBeforeAfter(&n.Type, before, after) case *ast.CallExpr: walkBeforeAfter(&n.Fun, before, after) walkBeforeAfter(&n.Args, before, after) case *ast.StarExpr:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 14.6K bytes - Viewed (0) -
src/cmd/cgo/ast.go
if n.Low != nil { f.walk(&n.Low, ctxExpr, visit) } if n.High != nil { f.walk(&n.High, ctxExpr, visit) } if n.Max != nil { f.walk(&n.Max, ctxExpr, visit) } case *ast.TypeAssertExpr: f.walk(&n.X, ctxExpr, visit) f.walk(&n.Type, ctxType, visit) case *ast.CallExpr: if context == ctxAssign2 { f.walk(&n.Fun, ctxCall2, visit) } else { f.walk(&n.Fun, ctxCall, 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.applyList(n, "Indices") case *ast.SliceExpr: a.apply(n, "X", nil, n.X) a.apply(n, "Low", nil, n.Low) a.apply(n, "High", nil, n.High) a.apply(n, "Max", nil, n.Max) case *ast.TypeAssertExpr: a.apply(n, "X", nil, n.X) a.apply(n, "Type", nil, n.Type) case *ast.CallExpr: a.apply(n, "Fun", nil, n.Fun) a.applyList(n, "Args") case *ast.StarExpr: 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/cmd/compile/internal/walk/expr.go
n := n.(*ir.UnaryExpr) return walkUnsafeData(n, init) case ir.ODOT, ir.ODOTPTR: n := n.(*ir.SelectorExpr) return walkDot(n, init) case ir.ODOTTYPE, ir.ODOTTYPE2: n := n.(*ir.TypeAssertExpr) return walkDotType(n, init) case ir.ODYNAMICDOTTYPE, ir.ODYNAMICDOTTYPE2: n := n.(*ir.DynamicTypeAssertExpr) return walkDynamicDotType(n, init) case ir.OLEN, ir.OCAP:
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/typecheck/stmt.go
stmt := stmt.(*ir.AssignListStmt) r := rhs[0] switch r.Op() { case ir.OINDEXMAP: stmt.SetOp(ir.OAS2MAPR) case ir.ORECV: stmt.SetOp(ir.OAS2RECV) case ir.ODOTTYPE: r := r.(*ir.TypeAssertExpr) stmt.SetOp(ir.OAS2DOTTYPE) r.SetOp(ir.ODOTTYPE2) case ir.ODYNAMICDOTTYPE: r := r.(*ir.DynamicTypeAssertExpr) stmt.SetOp(ir.OAS2DOTTYPE) r.SetOp(ir.ODYNAMICDOTTYPE2) default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:10:54 UTC 2023 - 17.8K bytes - Viewed (0) -
src/cmd/fix/typecheck.go
} typeof[n] = join(out) for i, arg := range n.Args { if i >= len(in) { break } if typeof[arg] == "" { typeof[arg] = in[i] } } case *ast.TypeAssertExpr: // x.(type) has type of x. if n.Type == nil { typeof[n] = typeof[n.X] return } // x.(T) has type T. if t := typeof[n.Type]; isType(t) { typeof[n] = getType(t)
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/cmd/compile/internal/walk/order.go
case ir.OAS2DOTTYPE, ir.OAS2RECV, ir.OAS2MAPR: n := n.(*ir.AssignListStmt) t := o.markTemp() o.exprList(n.Lhs) switch r := n.Rhs[0]; r.Op() { case ir.ODOTTYPE2: r := r.(*ir.TypeAssertExpr) r.X = o.expr(r.X, nil) case ir.ODYNAMICDOTTYPE2: r := r.(*ir.DynamicTypeAssertExpr) r.X = o.expr(r.X, nil) r.RType = o.expr(r.RType, nil) r.ITab = o.expr(r.ITab, nil) case ir.ORECV:
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/typecheck/expr.go
n.SetOp(ir.OMETHVALUE) n.SetType(NewMethodType(n.Type(), nil)) } return n } // tcDotType typechecks an ODOTTYPE node. func tcDotType(n *ir.TypeAssertExpr) ir.Node { n.X = Expr(n.X) n.X = DefaultLit(n.X, nil) l := n.X t := l.Type() if t == nil { n.SetType(nil) return n } if !t.IsInterface() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 23.1K bytes - Viewed (0)