- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for varDecl (0.13 sec)
-
src/internal/types/testdata/check/vardecl.go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package vardecl // Prerequisites. import "math" func f() {} func g() (x, y int) { return } var m map[string]int // Var decls must have a type or an initializer. var _ int var _, _ int var _; /* ERROR "expected type" */ var _, _; /* ERROR "expected type" */
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 5.8K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/nodes_test.go
{"TypeDecl", `type (@T = int)`}, {"VarDecl", `var @x int`}, {"VarDecl", `var @x, y, z int`}, {"VarDecl", `var @x int = 0`}, {"VarDecl", `var @x, y, z int = 1, 2, 3`}, {"VarDecl", `var @x = 0`}, {"VarDecl", `var @x, y, z = 1, 2, 3`}, {"VarDecl", `var (@x int)`}, {"VarDecl", `var (@x, y, z int)`}, {"VarDecl", `var (@x int = 0)`}, {"VarDecl", `var (@x, y, z int = 1, 2, 3)`}, {"VarDecl", `var (@x = 0)`},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 18:45:06 UTC 2023 - 8.7K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/positions.go
case *File: // file block starts at the beginning of the file return MakePos(n.Pos().Base(), 1, 1) // declarations // case *ImportDecl: // case *ConstDecl: // case *TypeDecl: // case *VarDecl: // case *FuncDecl: // expressions // case *BadExpr: // case *Name: // case *BasicLit: case *CompositeLit: if n.Type != nil { m = n.Type continue } return n.Pos()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 17:49:19 UTC 2024 - 6.5K bytes - Viewed (0) -
src/cmd/internal/obj/wasm/wasmobj.go
varDecls = []*varDecl{} useAssemblyRegMap() case "memchr", "memcmp": varDecls = []*varDecl{{count: 2, typ: i32}} useAssemblyRegMap() case "cmpbody": varDecls = []*varDecl{{count: 2, typ: i64}} useAssemblyRegMap() case "gcWriteBarrier": varDecls = []*varDecl{{count: 5, typ: i64}} useAssemblyRegMap() case "runtime.gcWriteBarrier1",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 34.6K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/syntax.go
// The text is the directive, with the "//" prefix stripped. // The current pragma is saved at each package, import, const, func, type, or var // declaration, into the File, ImportDecl, ConstDecl, FuncDecl, TypeDecl, or VarDecl node. // // If text is the empty string, the pragma is being returned // to the handler unused, meaning it appeared before a non-declaration. // The handler may wish to report an error. In this case, pos is the
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 01 18:18:07 UTC 2022 - 3.1K bytes - Viewed (0) -
src/go/types/decl.go
iota int typ ast.Expr init []ast.Expr inherited bool } varDecl struct{ spec *ast.ValueSpec } typeDecl struct{ spec *ast.TypeSpec } funcDecl struct{ decl *ast.FuncDecl } ) func (d importDecl) node() ast.Node { return d.spec } func (d constDecl) node() ast.Node { return d.spec } func (d varDecl) node() ast.Node { return d.spec } func (d typeDecl) node() ast.Node { return d.spec }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/branches.go
for stmtIndex, stmt := range stmtList { lstmt = nil L: switch s := stmt.(type) { case *DeclStmt: for _, d := range s.DeclList { if v, ok := d.(*VarDecl); ok { recordVarDecl(v.Pos(), v.NameList[0]) break // the first VarDecl will do } } case *LabeledStmt: // declare non-blank label if name := s.Label.Value; name != "_" { l := ls.declare(b, s)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Jun 26 00:21:29 UTC 2022 - 9.8K bytes - Viewed (0) -
src/cmd/compile/internal/types2/decl.go
switch obj := obj.(type) { case *Const: check.decl = d // new package-level const decl check.constDecl(obj, d.vtyp, d.init, d.inherited) case *Var: check.decl = d // new package-level var decl check.varDecl(obj, d.lhs, d.vtyp, d.init) case *TypeName: // invalid recursive types are detected via path check.typeDecl(obj, d.tdecl, def) check.collectMethods(obj) // methods can only be added to top-level types case *Func:
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/cmd/compile/internal/syntax/walk.go
if n.Type != nil { w.node(n.Type) } if n.Values != nil { w.node(n.Values) } case *TypeDecl: w.node(n.Name) w.fieldList(n.TParamList) w.node(n.Type) case *VarDecl: w.nameList(n.NameList) if n.Type != nil { w.node(n.Type) } if n.Values != nil { w.node(n.Values) } case *FuncDecl: if n.Recv != nil { w.node(n.Recv) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:55:04 UTC 2023 - 5.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/labels.go
return false } var stmtBranches func(syntax.Stmt) stmtBranches = func(s syntax.Stmt) { switch s := s.(type) { case *syntax.DeclStmt: for _, d := range s.DeclList { if d, _ := d.(*syntax.VarDecl); d != nil { recordVarDecl(d.Pos()) } } case *syntax.LabeledStmt: // declare non-blank label if name := s.Label.Value; name != "_" { lbl := NewLabel(s.Label.Pos(), check.pkg, name)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 7.2K bytes - Viewed (0)