Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for ParenExpr (0.14 sec)

  1. src/cmd/compile/internal/inline/interleaved/interleaved.go

    	//
    	// To mitigate this, each matched node n is wrapped in a ParenExpr,
    	// so we can reliably replace n in-place by assigning ParenExpr.X.
    	// It's safe to use ParenExpr here, because typecheck already
    	// removed them all.
    
    	var parens []*ir.ParenExpr
    	var mark func(ir.Node) ir.Node
    	mark = func(n ir.Node) ir.Node {
    		if _, ok := n.(*ir.ParenExpr); ok {
    			return n // already visited n.X before wrapping
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 20:42:52 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/syntax/positions.go

    		// case *Name:
    		// case *BasicLit:
    		case *CompositeLit:
    			if n.Type != nil {
    				m = n.Type
    				continue
    			}
    			return n.Pos()
    		case *KeyValueExpr:
    			m = n.Key
    		// case *FuncLit:
    		// case *ParenExpr:
    		case *SelectorExpr:
    			m = n.X
    		case *IndexExpr:
    			m = n.X
    		// case *SliceExpr:
    		case *AssertExpr:
    			m = n.X
    		case *TypeSwitchGuard:
    			if n.Lhs != nil {
    				m = n.Lhs
    				continue
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. src/go/ast/ast.go

    		Rbrace     token.Pos // position of "}"
    		Incomplete bool      // true if (source) expressions are missing in the Elts list
    	}
    
    	// A ParenExpr node represents a parenthesized expression.
    	ParenExpr struct {
    		Lparen token.Pos // position of "("
    		X      Expr      // parenthesized expression
    		Rparen 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)
  4. src/go/types/exprstring.go

    		buf.WriteString(" literal)") // shortened
    
    	case *ast.CompositeLit:
    		WriteExpr(buf, x.Type)
    		buf.WriteByte('{')
    		if len(x.Elts) > 0 {
    			buf.WriteString("…")
    		}
    		buf.WriteByte('}')
    
    	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)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 19:31:44 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. src/go/ast/walk.go

    			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)
    
    	case *IndexExpr:
    		Walk(v, n.X)
    		Walk(v, n.Index)
    
    	case *IndexListExpr:
    		Walk(v, n.X)
    		walkList(v, n.Indices)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:34:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/check.go

    	// children.
    	for {
    		check.recordTypeAndValue(f, builtin, sig, nil)
    		switch p := f.(type) {
    		case *syntax.Name, *syntax.SelectorExpr:
    			return // we're done
    		case *syntax.ParenExpr:
    			f = p.X
    		default:
    			panic("unreachable")
    		}
    	}
    }
    
    // recordCommaOkTypes updates recorded types to reflect that x is used in a commaOk context
    // (and therefore has tuple type).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.3K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/builtins_test.go

    				return
    			}
    			if bin.Name() != name {
    				t.Errorf("%s: got built-in %s; want %s", src0, bin.Name(), name)
    				return
    			}
    			return // we're done
    
    		case *syntax.ParenExpr:
    			fun = p.X // unpack
    
    		case *syntax.SelectorExpr:
    			// built-in from package unsafe - ignore details
    			return // we're done
    
    		default:
    			t.Errorf("%s: invalid function call", src0)
    			return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 18:06:31 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  8. src/go/types/check.go

    	// children.
    	for {
    		check.recordTypeAndValue(f, builtin, sig, nil)
    		switch p := f.(type) {
    		case *ast.Ident, *ast.SelectorExpr:
    			return // we're done
    		case *ast.ParenExpr:
    			f = p.X
    		default:
    			panic("unreachable")
    		}
    	}
    }
    
    // recordCommaOkTypes updates recorded types to reflect that x is used in a commaOk context
    // (and therefore has tuple type).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  9. src/go/parser/parser_test.go

    	{name: "binary", format: "package main; var x = «1+»1"},
    	{name: "binaryparen", format: "package main; var x = «1+(«1»)»", parseMultiplier: 2}, // Parser nodes: BinaryExpr, ParenExpr
    	{name: "unary", format: "package main; var x = «^»1"},
    	{name: "addr", format: "package main; var x = «& »x"},
    	{name: "star", format: "package main; var x = «*»x"},
    	{name: "recv", format: "package main; var x = «<-»x"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:26:14 UTC 2024
    - 24.6K bytes
    - Viewed (0)
  10. src/go/types/builtins_test.go

    				return
    			}
    			if bin.Name() != name {
    				t.Errorf("%s: got built-in %s; want %s", src0, bin.Name(), name)
    				return
    			}
    			return // we're done
    
    		case *ast.ParenExpr:
    			fun = p.X // unpack
    
    		case *ast.SelectorExpr:
    			// built-in from package unsafe - ignore details
    			return // we're done
    
    		default:
    			t.Errorf("%s: invalid function call", src0)
    			return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 10.9K bytes
    - Viewed (0)
Back to top