Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for varDecl (0.27 sec)

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

    		return isTypeElem(x.X)
    	}
    	return false
    }
    
    // VarSpec = IdentifierList ( Type [ "=" ExpressionList ] | "=" ExpressionList ) .
    func (p *parser) varDecl(group *Group) Decl {
    	if trace {
    		defer p.trace("varDecl")()
    	}
    
    	d := new(VarDecl)
    	d.pos = p.pos()
    	d.Group = group
    	d.Pragma = p.takePragma()
    
    	d.NameList = p.nameList(p.name())
    	if p.gotAssign() {
    		d.Values = p.exprList()
    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/cmd/compile/internal/types2/api_test.go

    			}
    			if got := tv.Type.String(); got != want {
    				t.Errorf("%s: got %v, want %s", test.lit, got, want)
    			}
    		}
    
    		// test type of composite literal expression
    		rhs := f.DeclList[0].(*syntax.VarDecl).Values
    		cmptype(rhs, test.typ)
    
    		// test type of composite literal type expression
    		cmptype(rhs.(*syntax.CompositeLit).Type, test.typ)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
Back to top