Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for paramDeclOrNil (0.15 sec)

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

    		p.advance(_Operator, _Semi, _Rparen, _Rbrack, _Rbrace)
    	}
    
    	return t
    }
    
    // ParameterDecl = [ IdentifierList ] [ "..." ] Type .
    func (p *parser) paramDeclOrNil(name *Name, follow token) *Field {
    	if trace {
    		defer p.trace("paramDeclOrNil")()
    	}
    
    	// type set notation is ok in type parameter lists
    	typeSetsOk := follow == _Rbrack
    
    	pos := p.pos()
    	if name != nil {
    		pos = name.pos
    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/parser/parser.go

    	name *ast.Ident
    	typ  ast.Expr
    }
    
    func (p *parser) parseParamDecl(name *ast.Ident, typeSetsOK bool) (f field) {
    	// TODO(rFindley) refactor to be more similar to paramDeclOrNil in the syntax
    	// package
    	if p.trace {
    		defer un(trace(p, "ParamDeclOrNil"))
    	}
    
    	ptok := p.tok
    	if name != nil {
    		p.tok = token.IDENT // force token.IDENT case in switch below
    	} else if typeSetsOK && p.tok == token.TILDE {
    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