Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 39 for yieldList (0.36 sec)

  1. src/cmd/compile/internal/typecheck/mkbuiltin.go

    		return fmt.Sprintf("types.NewStruct(%s)", i.fields(t.Fields, true))
    
    	default:
    		log.Fatalf("unhandled type: %#v", t)
    		panic("unreachable")
    	}
    }
    
    func (i *typeInterner) fields(fl *ast.FieldList, keepNames bool) string {
    	if fl == nil || len(fl.List) == 0 {
    		return "nil"
    	}
    
    	var res []string
    	for _, f := range fl.List {
    		typ := i.subtype(f.Type)
    		if len(f.Names) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 26 21:56:49 UTC 2023
    - 6K bytes
    - Viewed (0)
  2. src/go/parser/parser.go

    func (p *parser) parseParameters(acceptTParams bool) (tparams, params *ast.FieldList) {
    	if p.trace {
    		defer un(trace(p, "Parameters"))
    	}
    
    	if acceptTParams && p.tok == token.LBRACK {
    		opening := p.pos
    		p.next()
    		// [T any](params) syntax
    		list := p.parseParameterList(nil, nil, token.RBRACK)
    		rbrack := p.expect(token.RBRACK)
    		tparams = &ast.FieldList{Opening: opening, List: list, Closing: rbrack}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/syntax/positions.go

    			}
    			return n.Pos()
    
    		// types
    		case *ArrayType:
    			m = n.Elem
    		case *SliceType:
    			m = n.Elem
    		case *DotsType:
    			m = n.Elem
    		case *StructType:
    			if l := lastField(n.FieldList); l != nil {
    				m = l
    				continue
    			}
    			return n.Pos()
    			// TODO(gri) need to take TagList into account
    		case *Field:
    			if n.Type != nil {
    				m = n.Type
    				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)
  4. src/go/ast/filter.go

    	case *Ident:
    		return t
    	case *SelectorExpr:
    		if _, ok := t.X.(*Ident); ok {
    			return t.Sel
    		}
    	case *StarExpr:
    		return fieldName(t.X)
    	}
    	return nil
    }
    
    func filterFieldList(fields *FieldList, filter Filter, export bool) (removedFields bool) {
    	if fields == nil {
    		return false
    	}
    	list := fields.List
    	j := 0
    	for _, f := range list {
    		keepField := false
    		if len(f.Names) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  5. src/go/ast/walk.go

    			Walk(v, n.Doc)
    		}
    		walkList(v, n.Names)
    		if n.Type != nil {
    			Walk(v, n.Type)
    		}
    		if n.Tag != nil {
    			Walk(v, n.Tag)
    		}
    		if n.Comment != nil {
    			Walk(v, n.Comment)
    		}
    
    	case *FieldList:
    		walkList(v, n.List)
    
    	// Expressions
    	case *BadExpr, *Ident, *BasicLit:
    		// nothing to do
    
    	case *Ellipsis:
    		if n.Elt != nil {
    			Walk(v, n.Elt)
    		}
    
    	case *FuncLit:
    		Walk(v, n.Type)
    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/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    // inadvertently copy a lock, by checking whether
    // its receiver, parameters, or return values
    // are locks.
    func checkCopyLocksFunc(pass *analysis.Pass, name string, recv *ast.FieldList, typ *ast.FuncType) {
    	if recv != nil && len(recv.List) > 0 {
    		expr := recv.List[0].Type
    		if path := lockPath(pass.Pkg, pass.TypesInfo.Types[expr].Type, nil); path != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  7. src/cmd/fix/typecheck.go

    // be to pass typecheck a map from importpath to package API text
    // (Go source code), but for now we use data structures (TypeConfig, Type).
    //
    // The strings mostly use gofmt form.
    //
    // A Field or FieldList has as its type a comma-separated list
    // of the types of the fields. For example, the field list
    //	x, y, z int
    // has type "int, int, int".
    
    // The prefix "type " is the type of a type.
    // For example, given
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 16 22:02:42 UTC 2022
    - 20.1K bytes
    - Viewed (0)
  8. src/go/printer/nodes.go

    	return namesSize+typeSize <= maxSize
    }
    
    func (p *printer) setLineComment(text string) {
    	p.setComment(&ast.CommentGroup{List: []*ast.Comment{{Slash: token.NoPos, Text: text}}})
    }
    
    func (p *printer) fieldList(fields *ast.FieldList, isStruct, isIncomplete bool) {
    	lbrace := fields.Opening
    	list := fields.List
    	rbrace := fields.Closing
    	hasComments := isIncomplete || p.commentBefore(p.posFor(rbrace))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  9. src/go/doc/reader.go

    	r.order++
    }
    
    // fields returns a struct's fields or an interface's methods.
    func fields(typ ast.Expr) (list []*ast.Field, isStruct bool) {
    	var fields *ast.FieldList
    	switch t := typ.(type) {
    	case *ast.StructType:
    		fields = t.Fields
    		isStruct = true
    	case *ast.InterfaceType:
    		fields = t.Methods
    	}
    	if fields != nil {
    		list = fields.List
    	}
    	return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/syntax/parser.go

    	if tag != nil {
    		for i := len(styp.FieldList) - len(styp.TagList); i > 0; i-- {
    			styp.TagList = append(styp.TagList, nil)
    		}
    		styp.TagList = append(styp.TagList, tag)
    	}
    
    	f := new(Field)
    	f.pos = pos
    	f.Name = name
    	f.Type = typ
    	styp.FieldList = append(styp.FieldList, f)
    
    	if debug && tag != nil && len(styp.FieldList) != len(styp.TagList) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
Back to top