- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for TypeAssertExpr (0.22 sec)
-
src/go/printer/testdata/parser.go
p.expect(token.LPAREN) var typ ast.Expr if p.tok == token.TYPE { // type switch: typ == nil p.next() } else { typ = p.parseType() } p.expect(token.RPAREN) return &ast.TypeAssertExpr{x, typ} } func (p *parser) parseIndexOrSlice(x ast.Expr) ast.Expr { if p.trace { defer un(trace(p, "IndexOrSlice")) } lbrack := p.expect(token.LBRACK) p.exprLev++
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 20:19:51 UTC 2023 - 50.5K bytes - Viewed (0) -
src/go/types/expr.go
return // nothing to do } // update operands of x if necessary switch x := x.(type) { case *ast.BadExpr, *ast.FuncLit, *ast.CompositeLit, *ast.IndexExpr, *ast.SliceExpr, *ast.TypeAssertExpr, *ast.StarExpr, *ast.KeyValueExpr, *ast.ArrayType, *ast.StructType, *ast.FuncType, *ast.InterfaceType, *ast.MapType, *ast.ChanType:
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/go/parser/parser.go
var typ ast.Expr if p.tok == token.TYPE { // type switch: typ == nil p.next() } else { typ = p.parseType() } rparen := p.expect(token.RPAREN) return &ast.TypeAssertExpr{X: x, Type: typ, Lparen: lparen, Rparen: rparen} } func (p *parser) parseIndexOrSliceOrInstance(x ast.Expr) ast.Expr { if p.trace { defer un(trace(p, "parseIndexOrSliceOrInstance")) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 08 20:07:50 UTC 2023 - 72.2K bytes - Viewed (0) -
src/go/printer/nodes.go
p.expr0(x.X, reduceDepth(depth)) // parentheses undo one level of depth p.setPos(x.Rparen) p.print(token.RPAREN) } case *ast.SelectorExpr: p.selectorExpr(x, depth, false) case *ast.TypeAssertExpr: p.expr1(x.X, token.HighestPrec, depth) p.print(token.PERIOD) p.setPos(x.Lparen) p.print(token.LPAREN) if x.Type != nil { p.expr(x.Type) } else { p.print(token.TYPE) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0)