Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 43 for ParenExpr (0.19 sec)

  1. src/cmd/cgo/ast.go

    	case *ast.BasicLit:
    	case *ast.FuncLit:
    		f.walk(n.Type, ctxType, visit)
    		f.walk(n.Body, ctxStmt, visit)
    	case *ast.CompositeLit:
    		f.walk(&n.Type, ctxType, visit)
    		f.walk(n.Elts, ctxExpr, visit)
    	case *ast.ParenExpr:
    		f.walk(&n.X, context, visit)
    	case *ast.SelectorExpr:
    		f.walk(&n.X, ctxSelector, visit)
    	case *ast.IndexExpr:
    		f.walk(&n.X, ctxExpr, visit)
    		f.walk(&n.Index, ctxExpr, visit)
    	case *ast.SliceExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  2. 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)
  3. src/go/doc/exports.go

    // struct or interface type has the Incomplete field set to true.
    func (r *reader) filterType(parent *namedType, typ ast.Expr) {
    	switch t := typ.(type) {
    	case *ast.Ident:
    		// nothing to do
    	case *ast.ParenExpr:
    		r.filterType(nil, t.X)
    	case *ast.StarExpr: // possibly an embedded type literal
    		r.filterType(nil, t.X)
    	case *ast.UnaryExpr:
    		if t.Op == token.TILDE { // approximation element
    			r.filterType(nil, t.X)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 01 18:18:07 UTC 2022
    - 8.5K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/walk.go

    			w.node(n.Type)
    		}
    		w.exprList(n.ElemList)
    
    	case *KeyValueExpr:
    		w.node(n.Key)
    		w.node(n.Value)
    
    	case *FuncLit:
    		w.node(n.Type)
    		w.node(n.Body)
    
    	case *ParenExpr:
    		w.node(n.X)
    
    	case *SelectorExpr:
    		w.node(n.X)
    		w.node(n.Sel)
    
    	case *IndexExpr:
    		w.node(n.X)
    		w.node(n.Index)
    
    	case *SliceExpr:
    		w.node(n.X)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:55:04 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/syntax/nodes.go

    	// Key: Value
    	KeyValueExpr struct {
    		Key, Value Expr
    		expr
    	}
    
    	// func Type { Body }
    	FuncLit struct {
    		Type *FuncType
    		Body *BlockStmt
    		expr
    	}
    
    	// (X)
    	ParenExpr struct {
    		X Expr
    		expr
    	}
    
    	// X.Sel
    	SelectorExpr struct {
    		X   Expr
    		Sel *Name
    		expr
    	}
    
    	// X[Index]
    	// X[T1, T2, ...] (with Ti = Index.(*ListExpr).ElemList[i])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:38 UTC 2023
    - 9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/syntax/nodes_test.go

    	{"CompositeLit", `@{}`},
    	{"CompositeLit", `T@{}`},
    	{"CompositeLit", `struct{x, y int}@{}`},
    
    	{"KeyValueExpr", `"foo"@: true`},
    	{"KeyValueExpr", `"a"@: b`},
    
    	{"FuncLit", `@func (){}`},
    	{"ParenExpr", `@(x)`},
    	{"SelectorExpr", `a@.b`},
    	{"IndexExpr", `a@[i]`},
    
    	{"SliceExpr", `a@[:]`},
    	{"SliceExpr", `a@[i:]`},
    	{"SliceExpr", `a@[:j]`},
    	{"SliceExpr", `a@[i:j]`},
    	{"SliceExpr", `a@[i:j:k]`},
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 18:45:06 UTC 2023
    - 8.7K 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/printer/testdata/parser.go

    		return p.parseMapType()
    	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, typ, rparen}
    	}
    
    	// no type found
    	return nil
    }
    
    func (p *parser) tryType() ast.Expr {
    	typ := p.tryIdentOrType(false)
    	if typ != nil {
    		p.resolve(typ)
    	}
    	return typ
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.5K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top