Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for fieldDecl (0.19 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)
  4. doc/go1.17_spec.html

    Within a struct, non-<a href="#Blank_identifier">blank</a> field names must
    be <a href="#Uniqueness_of_identifiers">unique</a>.
    </p>
    
    <pre class="ebnf">
    StructType    = "struct" "{" { FieldDecl ";" } "}" .
    FieldDecl     = (IdentifierList Type | EmbeddedField) [ Tag ] .
    EmbeddedField = [ "*" ] TypeName .
    Tag           = string_lit .
    </pre>
    
    <pre>
    // An empty struct.
    struct {}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
  5. doc/go_spec.html

    Within a struct, non-<a href="#Blank_identifier">blank</a> field names must
    be <a href="#Uniqueness_of_identifiers">unique</a>.
    </p>
    
    <pre class="ebnf">
    StructType    = "struct" "{" { FieldDecl ";" } "}" .
    FieldDecl     = (IdentifierList Type | EmbeddedField) [ Tag ] .
    EmbeddedField = [ "*" ] TypeName [ TypeArgs ] .
    Tag           = string_lit .
    </pre>
    
    <pre>
    // An empty struct.
    struct {}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 21:07:21 UTC 2024
    - 281.5K bytes
    - Viewed (0)
  6. pkg/apis/core/validation/validation_test.go

    	testCases := []struct {
    		name           string
    		expectError    bool
    		featureEnabled bool
    		fieldSel       *core.ObjectFieldSelector
    	}{
    		{
    			name:           "has no hostIPs field, featuregate enabled",
    			expectError:    false,
    			featureEnabled: true,
    			fieldSel:       &core.ObjectFieldSelector{FieldPath: "status.hostIP"},
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 857.7K bytes
    - Viewed (0)
  7. pkg/apis/core/validation/validation.go

    		return allErrs
    	}
    
    	return allErrs
    }
    
    func validateDownwardAPIHostIPs(fieldSel *core.ObjectFieldSelector, fldPath *field.Path, opts PodValidationOptions) field.ErrorList {
    	allErrs := field.ErrorList{}
    	if !opts.AllowHostIPsField {
    		if fieldSel.FieldPath == "status.hostIPs" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 349.5K bytes
    - Viewed (0)
  8. src/internal/trace/traceviewer/static/trace_viewer_full.html

    const fieldEl=document.createElement('span');fieldEl.style.display='flex';fieldEl.style.alignItems='center';fieldEl.style.justifyContent='flex-end';Polymer.dom(fieldEl).appendChild(tr.ui.b.asHTMLOrTextNode(formattedFields));infos.forEach(function(info){const infoEl=document.createElement('span');infoEl.style.paddingLeft='4px';infoEl.st...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 20:45:06 UTC 2023
    - 2.5M bytes
    - Viewed (0)
Back to top