Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 39 for FieldList (0.14 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go

    			tok(n.Ellipsis, len("...")))
    
    	case *ast.EmptyStmt:
    		// nop
    
    	case *ast.ExprStmt:
    		// nop
    
    	case *ast.Field:
    		// TODO(adonovan): Field.{Doc,Comment,Tag}?
    
    	case *ast.FieldList:
    		children = append(children,
    			tok(n.Opening, len("(")), // or len("[")
    			tok(n.Closing, len(")"))) // or len("]")
    
    	case *ast.File:
    		// TODO test: Doc
    		children = append(children,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  2. 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)
  3. src/cmd/doc/pkg.go

    		typ.Methods = trimUnexportedFields(typ.Methods, true)
    	}
    }
    
    // trimUnexportedFields returns the field list trimmed of unexported fields.
    func trimUnexportedFields(fields *ast.FieldList, isInterface bool) *ast.FieldList {
    	what := "methods"
    	if !isInterface {
    		what = "fields"
    	}
    
    	trimmed := false
    	list := make([]*ast.Field, 0, len(fields.List))
    	for _, field := range fields.List {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 08 20:15:52 UTC 2024
    - 32K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/printer.go

    	case *StructType:
    		p.print(_Struct)
    		if len(n.FieldList) > 0 && p.linebreaks {
    			p.print(blank)
    		}
    		p.print(_Lbrace)
    		if len(n.FieldList) > 0 {
    			if p.linebreaks {
    				p.print(newline, indent)
    				p.printFieldList(n.FieldList, n.TagList, _Semi)
    				p.print(outdent, newline)
    			} else {
    				p.printFieldList(n.FieldList, n.TagList, _Semi)
    			}
    		}
    		p.print(_Rbrace)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 07:17:27 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go

    			if r == nil {
    				return nil
    			}
    			returns = append(returns, &ast.Field{
    				Type: r,
    			})
    		}
    		return &ast.FuncType{
    			Params: &ast.FieldList{
    				List: params,
    			},
    			Results: &ast.FieldList{
    				List: returns,
    			},
    		}
    	case interface{ Obj() *types.TypeName }: // *types.{Alias,Named,TypeParam}
    		if t.Obj().Pkg() == nil {
    			return ast.NewIdent(t.Obj().Name())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go

    	case *ast.Ellipsis:
    		return 1 << nEllipsis
    	case *ast.EmptyStmt:
    		return 1 << nEmptyStmt
    	case *ast.ExprStmt:
    		return 1 << nExprStmt
    	case *ast.Field:
    		return 1 << nField
    	case *ast.FieldList:
    		return 1 << nFieldList
    	case *ast.File:
    		return 1 << nFile
    	case *ast.ForStmt:
    		return 1 << nForStmt
    	case *ast.FuncDecl:
    		return 1 << nFuncDecl
    	case *ast.FuncLit:
    		return 1 << nFuncLit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  7. api/go1.18.txt

    pkg go/ast, type FuncType struct, TypeParams *FieldList
    pkg go/ast, type IndexListExpr struct
    pkg go/ast, type IndexListExpr struct, Indices []Expr
    pkg go/ast, type IndexListExpr struct, Lbrack token.Pos
    pkg go/ast, type IndexListExpr struct, Rbrack token.Pos
    pkg go/ast, type IndexListExpr struct, X Expr
    pkg go/ast, type TypeSpec struct, TypeParams *FieldList
    pkg go/constant, method (Kind) String() string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 20:31:46 UTC 2023
    - 13K bytes
    - Viewed (0)
  8. src/go/types/signature.go

    // ----------------------------------------------------------------------------
    // Implementation
    
    // funcType type-checks a function or method type.
    func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast.FuncType) {
    	check.openScope(ftyp, "function")
    	check.scope.isFunc = true
    	check.recordScope(ftyp, check.scope)
    	sig.scope = check.scope
    	defer check.closeScope()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 13K bytes
    - Viewed (0)
  9. src/go/ast/example_test.go

    	//     14  .  .  .  .  .  Decl: *(obj @ 7)
    	//     15  .  .  .  .  }
    	//     16  .  .  .  }
    	//     17  .  .  .  Type: *ast.FuncType {
    	//     18  .  .  .  .  Func: 3:1
    	//     19  .  .  .  .  Params: *ast.FieldList {
    	//     20  .  .  .  .  .  Opening: 3:10
    	//     21  .  .  .  .  .  Closing: 3:11
    	//     22  .  .  .  .  }
    	//     23  .  .  .  }
    	//     24  .  .  .  Body: *ast.BlockStmt {
    	//     25  .  .  .  .  Lbrace: 3:13
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:44:50 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  10. 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)
Back to top