Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for parseChanType (0.22 sec)

  1. src/go/internal/gccgoimporter/parser.go

    	p.expect('[')
    	key := p.parseType(pkg)
    	p.expect(']')
    	elem := p.parseType(pkg)
    
    	*t = *types.NewMap(key, elem)
    	return t
    }
    
    // ChanType = "chan" ["<-" | "-<"] Type .
    func (p *parser) parseChanType(pkg *types.Package, nlist []any) types.Type {
    	p.expectKeyword("chan")
    
    	t := new(types.Chan)
    	p.update(t, nlist)
    
    	dir := types.SendRecv
    	switch p.tok {
    	case '-':
    		p.next()
    		p.expect('<')
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 02 23:14:07 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  2. src/go/printer/testdata/parser.go

    	}
    
    	pos := p.expect(token.MAP)
    	p.expect(token.LBRACK)
    	key := p.parseType()
    	p.expect(token.RBRACK)
    	value := p.parseType()
    
    	return &ast.MapType{pos, key, value}
    }
    
    func (p *parser) parseChanType() *ast.ChanType {
    	if p.trace {
    		defer un(trace(p, "ChanType"))
    	}
    
    	pos := p.pos
    	dir := ast.SEND | ast.RECV
    	if p.tok == token.CHAN {
    		p.next()
    		if p.tok == token.ARROW {
    			p.next()
    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/go/parser/parser.go

    	p.expect(token.LBRACK)
    	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()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
Back to top