Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for FieldList (0.44 sec)

  1. src/go/printer/testdata/parser.go

    	if p.trace {
    		defer un(trace(p, "Result"))
    	}
    
    	if p.tok == token.LPAREN {
    		return p.parseParameters(scope, false)
    	}
    
    	typ := p.tryType()
    	if typ != nil {
    		list := make([]*ast.Field, 1)
    		list[0] = &ast.Field{Type: typ}
    		return &ast.FieldList{List: list}
    	}
    
    	return nil
    }
    
    func (p *parser) parseSignature(scope *ast.Scope) (params, results *ast.FieldList) {
    	if p.trace {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.5K 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/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)
  4. 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)
  5. src/cmd/cgo/out.go

    	if prefix == "" {
    		prefix = "go"
    	}
    	return prefix + "." + p.PackageName
    }
    
    // Call a function for each entry in an ast.FieldList, passing the
    // index into the list, the name if any, and the type.
    func forFieldList(fl *ast.FieldList, fn func(int, string, ast.Expr)) {
    	if fl == nil {
    		return
    	}
    	i := 0
    	for _, r := range fl.List {
    		if r.Names == nil {
    			fn(i, "", r.Type)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:10 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  6. src/cmd/cgo/gcc.go

    		r = c.Type(unqual(dtype.ReturnType), pos)
    		gr = []*ast.Field{{Type: r.Go}}
    	}
    	return &FuncType{
    		Params: p,
    		Result: r,
    		Go: &ast.FuncType{
    			Params:  &ast.FieldList{List: gp},
    			Results: &ast.FieldList{List: gr},
    		},
    	}
    }
    
    // Identifier
    func (c *typeConv) Ident(s string) *ast.Ident {
    	return ast.NewIdent(s)
    }
    
    // Opaque type of n bytes.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 97K bytes
    - Viewed (0)
Back to top