Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for fieldDecl (0.21 sec)

  1. src/cmd/compile/internal/syntax/parser.go

    		panic("inconsistent struct field list")
    	}
    }
    
    // FieldDecl      = (IdentifierList Type | AnonymousField) [ Tag ] .
    // AnonymousField = [ "*" ] TypeName .
    // Tag            = string_lit .
    func (p *parser) fieldDecl(styp *StructType) {
    	if trace {
    		defer p.trace("fieldDecl")()
    	}
    
    	pos := p.pos()
    	switch p.tok {
    	case _Name:
    		name := p.name()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  2. src/go/printer/testdata/parser.go

    			ident = &ast.Ident{pos, "_", nil}
    		}
    		idents[i] = ident
    	}
    	return idents
    }
    
    func (p *parser) parseFieldDecl(scope *ast.Scope) *ast.Field {
    	if p.trace {
    		defer un(trace(p, "FieldDecl"))
    	}
    
    	doc := p.leadComment
    
    	// fields
    	list, typ := p.parseVarList(false)
    
    	// optional tag
    	var tag *ast.BasicLit
    	if p.tok == token.STRING {
    		tag = &ast.BasicLit{p.pos, p.tok, p.lit}
    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

    		}
    	}
    
    	// x[P], x[P1, P2], ...
    	return nil, typeparams.PackIndexExpr(x, lbrack, args, rbrack)
    }
    
    func (p *parser) parseFieldDecl() *ast.Field {
    	if p.trace {
    		defer un(trace(p, "FieldDecl"))
    	}
    
    	doc := p.leadComment
    
    	var names []*ast.Ident
    	var typ ast.Expr
    	switch p.tok {
    	case token.IDENT:
    		name := p.parseIdent()
    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