- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 43 for ChanType (0.4 sec)
-
src/go/ast/ast.go
} // A MapType node represents a map type. MapType struct { Map token.Pos // position of "map" keyword Key Expr Value Expr } // A ChanType node represents a channel type. ChanType struct { Begin token.Pos // position of "chan" keyword or "<-" (whichever comes first) Arrow token.Pos // position of "<-" (token.NoPos if there is no "<-") Dir ChanDir // channel direction
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 35.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
children = append(children, tok(n.Case, len("default"))) } else { children = append(children, tok(n.Case, len("case"))) } children = append(children, tok(n.Colon, len(":"))) case *ast.ChanType: switch n.Dir { case ast.RECV: children = append(children, tok(n.Begin, len("<-chan"))) case ast.SEND: children = append(children, tok(n.Begin, len("chan<-"))) case ast.RECV | ast.SEND:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 15.9K bytes - Viewed (0) -
src/go/ast/walk.go
Walk(v, n.Params) } if n.Results != nil { Walk(v, n.Results) } case *InterfaceType: Walk(v, n.Methods) case *MapType: Walk(v, n.Key) Walk(v, n.Value) case *ChanType: Walk(v, n.Value) // Statements case *BadStmt: // nothing to do case *DeclStmt: Walk(v, n.Decl) case *EmptyStmt: // nothing to do case *LabeledStmt:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:34:10 UTC 2024 - 6.4K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/mkbuiltin.go
case *ast.ArrayType: if t.Len == nil { return fmt.Sprintf("types.NewSlice(%s)", i.subtype(t.Elt)) } return fmt.Sprintf("types.NewArray(%s, %d)", i.subtype(t.Elt), intconst(t.Len)) case *ast.ChanType: dir := "types.Cboth" switch t.Dir { case ast.SEND: dir = "types.Csend" case ast.RECV: dir = "types.Crecv" } return fmt.Sprintf("types.NewChan(%s, %s)", i.subtype(t.Value), dir)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 26 21:56:49 UTC 2023 - 6K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/walk.go
case *InterfaceType: w.fieldList(n.MethodList) case *FuncType: w.fieldList(n.ParamList) w.fieldList(n.ResultList) case *MapType: w.node(n.Key) w.node(n.Value) case *ChanType: w.node(n.Elem) // statements case *EmptyStmt: // nothing to do case *LabeledStmt: w.node(n.Label) w.node(n.Stmt) case *BlockStmt: w.stmtList(n.List)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:55:04 UTC 2023 - 5.7K bytes - Viewed (0) -
src/go/internal/gcimporter/iimport.go
type ident struct { pkg *types.Package 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
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.2K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/nodes.go
ParamList []*Field ResultList []*Field expr } // map[Key]Value MapType struct { Key, Value Expr expr } // chan Elem // <-chan Elem // chan<- Elem ChanType struct { Dir ChanDir // 0 means no direction Elem Expr expr } ) type expr struct { node typeAndValue // After typechecking, contains the results of typechecking this expression. }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 14:52:38 UTC 2023 - 9K bytes - Viewed (0) -
src/runtime/chan.go
} //go:linkname reflect_makechan reflect.makechan func reflect_makechan(t *chantype, size int) *hchan { return makechan(t, size) } func makechan64(t *chantype, size int64) *hchan { if int64(int(size)) != size { panic(plainError("makechan: size out of range")) } return makechan(t, int(size)) } func makechan(t *chantype, size int) *hchan { elem := t.Elem // compiler checks this but be safe.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:50 UTC 2024 - 25.9K bytes - Viewed (0) -
src/go/parser/parser.go
key := p.parseType() p.expect(token.RBRACK) value := p.parseType() return &ast.MapType{Map: pos, Key: key, Value: value} } func (p *parser) parseChanType() *ast.ChanType { if p.trace { defer un(trace(p, "ChanType")) } pos := p.pos dir := ast.SEND | ast.RECV var arrow token.Pos if p.tok == token.CHAN { p.next() if p.tok == token.ARROW { arrow = p.pos
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 08 20:07:50 UTC 2023 - 72.2K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/parser.go
// the channel type parsed already: // // <-(chan E) => (<-chan E) // <-(chan<-E) => (<-chan (<-E)) if _, ok := x.(*ChanType); ok { // x is a channel type => re-associate <- dir := SendOnly t := x for dir == SendOnly { c, ok := t.(*ChanType) if !ok { break } dir = c.Dir if dir == RecvOnly { // t is type <-chan E but <-<-chan E is not permitted
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 62.9K bytes - Viewed (0)