- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 38 for NewBar (0.15 sec)
-
src/cmd/compile/internal/types2/stmt.go
// declare new variable name := identName(ident) obj = NewVar(ident.Pos(), check.pkg, name, nil) check.recordDef(ident, obj) // _ variables don't count as new variables if name != "_" { vars = append(vars, obj) } } else { check.errorf(lhs, InvalidSyntaxTree, "cannot declare %s", lhs) obj = NewVar(lhs.Pos(), check.pkg, "_", nil) // dummy variable } assert(obj.typ == nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.7K bytes - Viewed (0) -
src/go/types/object.go
isField bool // var is struct field used bool // set if the variable was used origin *Var // if non-nil, the Var from which this one was instantiated } // NewVar returns a new variable. // The arguments set the attributes found with all Objects. func NewVar(pos token.Pos, pkg *Package, name string, typ Type) *Var { return &Var{object: object{nil, pos, pkg, name, typ, 0, colorFor(typ), nopos}} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 20.1K bytes - Viewed (0) -
src/cmd/compile/internal/rangefunc/rewrite.go
return x } func (r *rewriter) stateVar(pos syntax.Pos) (*types2.Var, *syntax.VarDecl) { r.stateVarCount++ name := fmt.Sprintf("#state%d", r.stateVarCount) typ := r.int.Type() obj := types2.NewVar(pos, r.pkg, name, typ) n := syntax.NewName(pos, name) setValueType(n, typ) r.info.Defs[n] = obj return obj, &syntax.VarDecl{NameList: []*syntax.Name{n}, Values: r.stateConst(abi.RF_READY)} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 41.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/object.go
isField bool // var is struct field used bool // set if the variable was used origin *Var // if non-nil, the Var from which this one was instantiated } // NewVar returns a new variable. // The arguments set the attributes found with all Objects. func NewVar(pos syntax.Pos, pkg *Package, name string, typ Type) *Var { return &Var{object: object{nil, pos, pkg, name, typ, 0, colorFor(typ), nopos}} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 20.1K bytes - Viewed (0) -
src/go/types/check.go
if m := check.Types; m != nil { for { tv := m[x] assert(tv.Type != nil) // should have been recorded already pos := x.Pos() tv.Type = NewTuple( NewVar(pos, check.pkg, "", t0), NewVar(pos, check.pkg, "", t1), ) m[x] = tv // if x is a parenthesized expression (p.X), update p.X p, _ := x.(*ast.ParenExpr) if p == nil { break } x = p.X }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 23.1K bytes - Viewed (0) -
src/go/types/builtins.go
func makeSig(res Type, args ...Type) *Signature { list := make([]*Var, len(args)) for i, param := range args { list[i] = NewVar(nopos, nil, "", Default(param)) } params := NewTuple(list...) var result *Tuple if res != nil { assert(!isUntyped(res)) result = NewTuple(NewVar(nopos, nil, "", res)) } return &Signature{params: params, results: result} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 27.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/builtins.go
func makeSig(res Type, args ...Type) *Signature { list := make([]*Var, len(args)) for i, param := range args { list[i] = NewVar(nopos, nil, "", Default(param)) } params := NewTuple(list...) var result *Tuple if res != nil { assert(!isUntyped(res)) result = NewTuple(NewVar(nopos, nil, "", res)) } return &Signature{params: params, results: result} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 27.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/call.go
} else { check.versionErrorf(instErrPos, go1_21, "implicitly instantiated function in assignment") } } gsig := NewSignatureType(nil, nil, nil, sig.params, sig.results, sig.variadic) params = []*Var{NewVar(x.Pos(), check.pkg, "", gsig)} // The type of the argument operand is tsig, which is the type of the LHS in an assignment // or the result type in a return statement. Create a pseudo-expression for that operand
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31.5K bytes - Viewed (0) -
src/go/types/call.go
} else { check.versionErrorf(instErrPos, go1_21, "implicitly instantiated function in assignment") } } gsig := NewSignatureType(nil, nil, nil, sig.params, sig.results, sig.variadic) params = []*Var{NewVar(x.Pos(), check.pkg, "", gsig)} // The type of the argument operand is tsig, which is the type of the LHS in an assignment // or the result type in a return statement. Create a pseudo-expression for that operand
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 33.5K bytes - Viewed (0) -
src/cmd/compile/internal/types2/resolver.go
d1 = &declInfo{file: fileScope, lhs: lhs, vtyp: s.Type, init: s.Values} } // declare all variables values := syntax.UnpackListExpr(s.Values) for i, name := range s.NameList { obj := NewVar(name.Pos(), pkg, name.Value, nil) lhs[i] = obj d := d1 if d == nil { // individual assignments var init syntax.Expr if i < len(values) { init = values[i]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 26.3K bytes - Viewed (0)