Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for ParenExpr (0.23 sec)

  1. 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)
  2. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go

    	case *ast.LabeledStmt:
    		children = append(children,
    			tok(n.Colon, len(":")))
    
    	case *ast.MapType:
    		children = append(children,
    			tok(n.Map, len("map")))
    
    	case *ast.ParenExpr:
    		children = append(children,
    			tok(n.Lparen, len("(")),
    			tok(n.Rparen, len(")")))
    
    	case *ast.RangeStmt:
    		children = append(children,
    			tok(n.For, len("for")),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. src/cmd/compile/internal/syntax/printer.go

    			}
    		} else {
    			if n.NKeys > 0 && n.NKeys == len(n.ElemList) {
    				p.printExprLines(n.ElemList)
    			} else {
    				p.printExprList(n.ElemList)
    			}
    		}
    		p.print(_Rbrace)
    
    	case *ParenExpr:
    		p.print(_Lparen, n.X, _Rparen)
    
    	case *SelectorExpr:
    		p.print(n.X, _Dot, n.Sel)
    
    	case *IndexExpr:
    		p.print(n.X, _Lbrack, n.Index, _Rbrack)
    
    	case *SliceExpr:
    		p.print(n.X, _Lbrack)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 07:17:27 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. src/go/ast/filter.go

    			b = true
    		}
    	}
    	return b
    }
    
    func filterType(typ Expr, f Filter, export bool) bool {
    	switch t := typ.(type) {
    	case *Ident:
    		return f(t.Name)
    	case *ParenExpr:
    		return filterType(t.X, f, export)
    	case *ArrayType:
    		return filterType(t.Elt, f, export)
    	case *StructType:
    		if filterFieldList(t.Fields, f, export) {
    			t.Incomplete = true
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    	case *ast.FuncLit:
    		a.apply(n, "Type", nil, n.Type)
    		a.apply(n, "Body", nil, n.Body)
    
    	case *ast.CompositeLit:
    		a.apply(n, "Type", nil, n.Type)
    		a.applyList(n, "Elts")
    
    	case *ast.ParenExpr:
    		a.apply(n, "X", nil, n.X)
    
    	case *ast.SelectorExpr:
    		a.apply(n, "X", nil, n.X)
    		a.apply(n, "Sel", nil, n.Sel)
    
    	case *ast.IndexExpr:
    		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)
Back to top