Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 45 for StructType (0.19 sec)

  1. src/go/types/typexpr.go

    		// (array composite literals and parameter lists)
    		check.error(e, InvalidDotDotDot, "invalid use of '...'")
    		check.use(e.Elt)
    
    	case *ast.StructType:
    		typ := new(Struct)
    		setDefType(def, typ)
    		check.structType(typ, e)
    		return typ
    
    	case *ast.StarExpr:
    		typ := new(Pointer)
    		typ.base = Typ[Invalid] // avoid nil base in invalid recursive type declaration
    		setDefType(def, typ)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  2. src/go/internal/gcimporter/iimport.go

    	name string
    }
    
    const predeclReserved = 32
    
    type itag uint64
    
    const (
    	// Types
    	definedType itag = iota
    	pointerType
    	sliceType
    	arrayType
    	chanType
    	mapType
    	signatureType
    	structType
    	interfaceType
    	typeParamType
    	instanceType
    	unionType
    )
    
    // iImportData imports a package from the serialized package data
    // and returns the number of bytes consumed and a reference to the package.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  3. src/go/internal/gccgoimporter/parser.go

    		if p.scanner.Peek() == '-' {
    			p.next()
    			p.expect('-')
    			dir = types.RecvOnly
    		}
    	}
    
    	*t = *types.NewChan(dir, p.parseType(pkg))
    	return t
    }
    
    // StructType = "struct" "{" { Field } "}" .
    func (p *parser) parseStructType(pkg *types.Package, nlist []any) types.Type {
    	p.expectKeyword("struct")
    
    	t := new(types.Struct)
    	p.update(t, nlist)
    
    	var fields []*types.Var
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 02 23:14:07 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  4. src/go/printer/testdata/declarations.input

    	}
    	CommonType struct {
    		Size, Hash, Alg, Align, FieldAlign, String, UncommonType int
    	}
    	Type struct {
    		Typ, Ptr int
    	}
    	StructField struct {
    		Name, PkgPath, Typ, Tag, Offset int
    	}
    	StructType struct {
    		Fields int
    	}
    	PtrType struct {
    		Elem int
    	}
    	SliceType struct {
    		Elem int
    	}
    	ArrayType struct {
    		Elem, Len int
    	}
    
    	Stktop struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 13 22:24:31 UTC 2021
    - 16.5K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types/fmt.go

    			tconv2(b, t.Result(0).Type, 0, mode, visited) // struct->field->field's type
    
    		default:
    			b.WriteByte(' ')
    			formatParams(b, t.Results(), mode, visited)
    		}
    
    	case TSTRUCT:
    		if m := t.StructType().Map; m != nil {
    			mt := m.MapType()
    			// Format the bucket struct for map[x]y as map.bucket[x]y.
    			// This avoids a recursive print that generates very long names.
    			switch t {
    			case mt.Bucket:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 15:41:17 UTC 2023
    - 15.7K bytes
    - Viewed (0)
  6. src/cmd/cgo/ast.go

    	case *ast.KeyValueExpr:
    		f.walk(&n.Key, ctxExpr, visit)
    		f.walk(&n.Value, ctxExpr, visit)
    
    	case *ast.ArrayType:
    		f.walk(&n.Len, ctxExpr, visit)
    		f.walk(&n.Elt, ctxType, visit)
    	case *ast.StructType:
    		f.walk(n.Fields, ctxField, visit)
    	case *ast.FuncType:
    		if tparams := funcTypeTypeParams(n); tparams != nil {
    			f.walk(tparams, ctxParam, visit)
    		}
    		f.walk(n.Params, ctxParam, visit)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    		a.apply(n, "Key", nil, n.Key)
    		a.apply(n, "Value", nil, n.Value)
    
    	// Types
    	case *ast.ArrayType:
    		a.apply(n, "Len", nil, n.Len)
    		a.apply(n, "Elt", nil, n.Elt)
    
    	case *ast.StructType:
    		a.apply(n, "Fields", nil, n.Fields)
    
    	case *ast.FuncType:
    		if tparams := n.TypeParams; tparams != nil {
    			a.apply(n, "TypeParams", nil, tparams)
    		}
    		a.apply(n, "Params", nil, n.Params)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  8. src/cmd/fix/fix.go

    		walkBeforeAfter(&n.Key, before, after)
    		walkBeforeAfter(&n.Value, before, after)
    
    	case *ast.ArrayType:
    		walkBeforeAfter(&n.Len, before, after)
    		walkBeforeAfter(&n.Elt, before, after)
    	case *ast.StructType:
    		walkBeforeAfter(&n.Fields, before, after)
    	case *ast.FuncType:
    		if n.TypeParams != nil {
    			walkBeforeAfter(&n.TypeParams, before, after)
    		}
    		walkBeforeAfter(&n.Params, before, after)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 14.6K bytes
    - Viewed (0)
  9. src/reflect/abi.go

    			// try to stack-assign this value.
    			return true
    		case 1:
    			return a.regAssign(tt.Elem, offset)
    		default:
    			return false
    		}
    	case Struct:
    		st := (*structType)(unsafe.Pointer(t))
    		for i := range st.Fields {
    			f := &st.Fields[i]
    			if !a.regAssign(f.Typ, offset+f.Offset) {
    				return false
    			}
    		}
    		return true
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:08:32 UTC 2024
    - 15K bytes
    - Viewed (0)
  10. src/go/ast/filter.go

    	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
    		}
    		return len(t.Fields.List) > 0
    	case *FuncType:
    		b1 := filterParamList(t.Params, f, export)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top