Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 43 for ParenExpr (0.25 sec)

  1. src/go/parser/parser.go

    	case token.CHAN, token.ARROW:
    		return p.parseChanType()
    	case token.LPAREN:
    		lparen := p.pos
    		p.next()
    		typ := p.parseType()
    		rparen := p.expect(token.RPAREN)
    		return &ast.ParenExpr{Lparen: lparen, X: typ, Rparen: rparen}
    	}
    
    	// no type found
    	return nil
    }
    
    // ----------------------------------------------------------------------------
    // Blocks
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  2. src/cmd/fix/typecheck.go

    						if ft := typ.Field[fmt.Sprintf("%s", kv.Key)]; ft != "" {
    							if typeof[kv.Value] == "" {
    								typeof[kv.Value] = ft
    							}
    						}
    					}
    				}
    			}
    
    		case *ast.ParenExpr:
    			// (x) has type of x.
    			typeof[n] = typeof[n.X]
    
    		case *ast.RangeStmt:
    			t := expand(typeof[n.X])
    			if t == "" {
    				return
    			}
    			var key, value string
    			if t == "string" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 16 22:02:42 UTC 2022
    - 20.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ir/fmt.go

    		nprec = OpPrec[ODEREF]
    	}
    
    	if prec > nprec {
    		fmt.Fprintf(s, "(%v)", n)
    		return
    	}
    
    	switch n.Op() {
    	case OPAREN:
    		n := n.(*ParenExpr)
    		fmt.Fprintf(s, "(%v)", n.X)
    
    	case ONIL:
    		fmt.Fprint(s, "nil")
    
    	case OLITERAL:
    		if n.Sym() != nil {
    			fmt.Fprint(s, n.Sym())
    			return
    		}
    
    		typ := n.Type()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  4. src/go/types/expr.go

    	case *ast.Ident, *ast.BasicLit, *ast.SelectorExpr:
    		// An identifier denoting a constant, a constant literal,
    		// or a qualified identifier (imported untyped constant).
    		// No operands to take care of.
    
    	case *ast.ParenExpr:
    		check.updateExprType0(x, x.X, typ, final)
    
    	case *ast.UnaryExpr:
    		// If x is a constant, the operands were constants.
    		// The operands don't need to be updated since they
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  5. src/go/doc/reader.go

    		return baseTypeName(t.X)
    	case *ast.SelectorExpr:
    		if _, ok := t.X.(*ast.Ident); ok {
    			// only possible for qualified type names;
    			// assume type is imported
    			return t.Sel.Name, true
    		}
    	case *ast.ParenExpr:
    		return baseTypeName(t.X)
    	case *ast.StarExpr:
    		return baseTypeName(t.X)
    	}
    	return "", false
    }
    
    // An embeddedSet describes a set of embedded types.
    type embeddedSet map[*namedType]bool
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/resolver.go

    	// work for other invalid receivers, but we don't care. The
    	// validity of receiver expressions is checked elsewhere.
    	for {
    		switch t := rtyp.(type) {
    		case *syntax.ParenExpr:
    			rtyp = t.X
    		// case *ast.StarExpr:
    		//      ptr = true
    		// 	rtyp = t.X
    		case *syntax.Operation:
    			if t.Op != syntax.Mul || t.Y != nil {
    				break
    			}
    			ptr = true
    			rtyp = t.X
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  7. src/go/types/resolver.go

    	// work for other invalid receivers, but we don't care. The
    	// validity of receiver expressions is checked elsewhere.
    	for {
    		switch t := rtyp.(type) {
    		case *ast.ParenExpr:
    			rtyp = t.X
    		case *ast.StarExpr:
    			ptr = true
    			rtyp = t.X
    		default:
    			break L
    		}
    	}
    
    	// unpack type parameters, if any
    	switch rtyp.(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:22:59 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/expr.go

    		// An identifier denoting a constant, a constant literal,
    		// or a qualified identifier (imported untyped constant).
    		// No operands to take care of.
    
    	case *syntax.ParenExpr:
    		check.updateExprType0(x, x.X, typ, final)
    
    	// case *syntax.UnaryExpr:
    	// 	// If x is a constant, the operands were constants.
    	// 	// The operands don't need to be updated since they
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/typecheck.go

    	}
    	return n
    }
    
    // typecheck1 should ONLY be called from typecheck.
    func typecheck1(n ir.Node, top int) ir.Node {
    	// Skip over parens.
    	for n.Op() == ir.OPAREN {
    		n = n.(*ir.ParenExpr).X
    	}
    
    	switch n.Op() {
    	default:
    		ir.Dump("typecheck", n)
    		base.Fatalf("typecheck %v", n.Op())
    		panic("unreachable")
    
    	case ir.ONAME:
    		n := n.(*ir.Name)
    		if n.BuiltinOp != 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)
  10. src/cmd/compile/internal/ssa/_gen/rulegen.go

    	case *ast.SelectorExpr:
    		u.node(node.X)
    	case *ast.UnaryExpr:
    		u.node(node.X)
    	case *ast.BinaryExpr:
    		u.node(node.X)
    		u.node(node.Y)
    	case *ast.StarExpr:
    		u.node(node.X)
    	case *ast.ParenExpr:
    		u.node(node.X)
    	case *ast.IndexExpr:
    		u.node(node.X)
    		u.node(node.Index)
    	case *ast.TypeAssertExpr:
    		u.node(node.X)
    		u.node(node.Type)
    	case *ast.Ident:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 02 22:09:21 UTC 2023
    - 48.7K bytes
    - Viewed (0)
Back to top