- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for record_if (0.15 sec)
-
src/cmd/compile/internal/types2/resolver.go
var fileScopes []*Scope for fileNo, file := range check.files { // The package identifier denotes the current package, // but there is no corresponding package object. check.recordDef(file.PkgName, nil) fileScope := NewScope(pkg.scope, syntax.StartPos(file), syntax.EndPos(file), check.filename(fileNo)) fileScopes = append(fileScopes, fileScope) check.recordScope(file, fileScope)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 26.3K bytes - Viewed (0) -
src/go/types/resolver.go
var fileScopes []*Scope for fileNo, file := range check.files { // The package identifier denotes the current package, // but there is no corresponding package object. check.recordDef(file.Name, nil) // Use the actual source file extent rather than *ast.File extent since the // latter doesn't include comments which appear at the start or end of the file.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 16:22:59 UTC 2024 - 26.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/assignments.go
// Determine if the lhs is a (possibly parenthesized) identifier. ident, _ := syntax.Unparen(lhs).(*syntax.Name) // Don't evaluate lhs if it is the blank identifier. if ident != nil && ident.Value == "_" { check.recordDef(ident, nil) return nil } // If the lhs is an identifier denoting a variable v, this reference // is not a 'use' of v. Remember current value of v.used and restore // after evaluating the lhs via check.expr.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 23 21:21:43 UTC 2024 - 16.4K bytes - Viewed (0) -
src/go/types/assignments.go
// Determine if the lhs is a (possibly parenthesized) identifier. ident, _ := ast.Unparen(lhs).(*ast.Ident) // Don't evaluate lhs if it is the blank identifier. if ident != nil && ident.Name == "_" { check.recordDef(ident, nil) return nil } // If the lhs is an identifier denoting a variable v, this reference // is not a 'use' of v. Remember current value of v.used and restore // after evaluating the lhs via check.expr.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 16.4K bytes - Viewed (0) -
src/go/types/stmt.go
// _ := x.(type) is an invalid short variable declaration check.softErrorf(lhs, NoNewVar, "no new variable on left side of :=") lhs = nil // avoid declared and not used error below } else { check.recordDef(lhs, nil) // lhs variable is implicitly declared in each cause clause } rhs = guard.Rhs[0] default: check.error(s, InvalidSyntaxTree, "incorrect form of type switch guard") return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/stmt.go
// _ := x.(type) is an invalid short variable declaration check.softErrorf(lhs, NoNewVar, "no new variable on left side of :=") lhs = nil // avoid declared and not used error below } else { check.recordDef(lhs, nil) // lhs variable is implicitly declared in each cause clause } } // check rhs var x operand check.expr(nil, &x, guard.X) if x.mode == invalid { return }
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/check.go
var buf strings.Builder buf.WriteString("instantiated ident not found; please report: ") ast.Fprint(&buf, token.NewFileSet(), expr, ast.NotNilFilter) panic(buf.String()) } func (check *Checker) recordDef(id *ast.Ident, obj Object) { assert(id != nil) if m := check.Defs; m != nil { m[id] = obj } } func (check *Checker) recordUse(id *ast.Ident, obj Object) { assert(id != nil) assert(obj != nil)
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/cmd/compile/internal/types2/check.go
} switch x := selOrIdent.(type) { case *syntax.Name: return x case *syntax.SelectorExpr: return x.Sel } panic("instantiated ident not found") } func (check *Checker) recordDef(id *syntax.Name, obj Object) { assert(id != nil) if m := check.Defs; m != nil { m[id] = obj } } func (check *Checker) recordUse(id *syntax.Name, obj Object) { assert(id != nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 23.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/decl.go
err := check.newError(DuplicateDecl) err.addf(obj, "%s redeclared in this block", obj.Name()) err.addAltDecl(alt) err.report() return } obj.setScopePos(pos) } if id != nil { check.recordDef(id, obj) } } // pathString returns a string of the form a->b-> ... ->g for a path [a, b, ... g]. func pathString(path []Object) string { var s string for i, p := range path { if i > 0 { s += "->"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 29.6K bytes - Viewed (0) -
src/go/types/decl.go
err := check.newError(DuplicateDecl) err.addf(obj, "%s redeclared in this block", obj.Name()) err.addAltDecl(alt) err.report() return } obj.setScopePos(pos) } if id != nil { check.recordDef(id, obj) } } // pathString returns a string of the form a->b-> ... ->g for a path [a, b, ... g]. func pathString(path []Object) string { var s string for i, p := range path { if i > 0 { s += "->"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31K bytes - Viewed (0)