Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for parseMapType (0.17 sec)

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

    	p.update(t, nlist)
    
    	len := p.parseInt64()
    	p.expect(']')
    
    	*t = *types.NewArray(p.parseType(pkg), len)
    	return t
    }
    
    // MapType = "map" "[" Type "]" Type .
    func (p *parser) parseMapType(pkg *types.Package, nlist []any) types.Type {
    	p.expectKeyword("map")
    
    	t := new(types.Map)
    	p.update(t, nlist)
    
    	p.expect('[')
    	key := p.parseType(pkg)
    	p.expect(']')
    	elem := p.parseType(pkg)
    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

    	}
    	rbrace := p.expect(token.RBRACE)
    
    	// TODO(gri): store interface scope in AST
    	return &ast.InterfaceType{pos, &ast.FieldList{lbrace, list, rbrace}, false}
    }
    
    func (p *parser) parseMapType() *ast.MapType {
    	if p.trace {
    		defer un(trace(p, "MapType"))
    	}
    
    	pos := p.expect(token.MAP)
    	p.expect(token.LBRACK)
    	key := p.parseType()
    	p.expect(token.RBRACK)
    	value := p.parseType()
    
    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

    	return &ast.InterfaceType{
    		Interface: pos,
    		Methods: &ast.FieldList{
    			Opening: lbrace,
    			List:    list,
    			Closing: rbrace,
    		},
    	}
    }
    
    func (p *parser) parseMapType() *ast.MapType {
    	if p.trace {
    		defer un(trace(p, "MapType"))
    	}
    
    	pos := p.expect(token.MAP)
    	p.expect(token.LBRACK)
    	key := p.parseType()
    	p.expect(token.RBRACK)
    	value := p.parseType()
    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