- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for ParenExpr (0.22 sec)
-
src/cmd/compile/internal/syntax/positions.go
// case *Name: // case *BasicLit: case *CompositeLit: if n.Type != nil { m = n.Type continue } return n.Pos() case *KeyValueExpr: m = n.Key // case *FuncLit: // case *ParenExpr: case *SelectorExpr: m = n.X case *IndexExpr: m = n.X // case *SliceExpr: case *AssertExpr: m = n.X case *TypeSwitchGuard: if n.Lhs != nil { m = n.Lhs continue }
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/go/ast/walk.go
Walk(v, n.Elt) } case *FuncLit: Walk(v, n.Type) Walk(v, n.Body) case *CompositeLit: if n.Type != nil { Walk(v, n.Type) } walkList(v, n.Elts) case *ParenExpr: Walk(v, n.X) case *SelectorExpr: Walk(v, n.X) Walk(v, n.Sel) case *IndexExpr: Walk(v, n.X) Walk(v, n.Index) case *IndexListExpr: Walk(v, n.X) walkList(v, n.Indices)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:34:10 UTC 2024 - 6.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/check.go
// children. for { check.recordTypeAndValue(f, builtin, sig, nil) switch p := f.(type) { case *syntax.Name, *syntax.SelectorExpr: return // we're done case *syntax.ParenExpr: f = p.X default: panic("unreachable") } } } // recordCommaOkTypes updates recorded types to reflect that x is used in a commaOk context // (and therefore has tuple type).
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/go/types/check.go
// children. for { check.recordTypeAndValue(f, builtin, sig, nil) switch p := f.(type) { case *ast.Ident, *ast.SelectorExpr: return // we're done case *ast.ParenExpr: f = p.X default: panic("unreachable") } } } // recordCommaOkTypes updates recorded types to reflect that x is used in a commaOk context // (and therefore has tuple type).
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/syntax/parser.go
case *ArrayType, *StructType, *FuncType, *InterfaceType, *SliceType, *MapType, *ChanType: return true case *Operation: return isTypeElem(x.X) || (x.Y != nil && isTypeElem(x.Y)) || x.Op == Tilde case *ParenExpr: return isTypeElem(x.X) } return false } // VarSpec = IdentifierList ( Type [ "=" ExpressionList ] | "=" ExpressionList ) . func (p *parser) varDecl(group *Group) Decl { if trace {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 62.9K bytes - Viewed (0) -
src/go/ast/filter.go
b = true } } return b } func filterType(typ Expr, f Filter, export bool) bool { switch t := typ.(type) { case *Ident: return f(t.Name) case *ParenExpr: return filterType(t.X, f, export) case *ArrayType: return filterType(t.Elt, f, export) case *StructType: if filterFieldList(t.Fields, f, export) { t.Incomplete = true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 13.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typexpr.go
} case *syntax.IndexExpr: check.verifyVersionf(e, go1_18, "type instantiation") return check.instantiatedType(e.X, syntax.UnpackListExpr(e.Index), def) case *syntax.ParenExpr: // Generic types must be instantiated before they can be used in any form. // Consequently, generic types cannot be parenthesized. return check.definedType(e.X, def) case *syntax.ArrayType:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.6K bytes - Viewed (0) -
src/go/types/typexpr.go
case *ast.IndexExpr, *ast.IndexListExpr: ix := typeparams.UnpackIndexExpr(e) check.verifyVersionf(inNode(e, ix.Lbrack), go1_18, "type instantiation") return check.instantiatedType(ix, def) case *ast.ParenExpr: // Generic types must be instantiated before they can be used in any form. // Consequently, generic types cannot be parenthesized. return check.definedType(e.X, def) case *ast.ArrayType:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.3K bytes - Viewed (0) -
src/cmd/compile/internal/walk/assign.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:09:06 UTC 2024 - 20.3K bytes - Viewed (0) -
src/go/printer/printer_test.go
const want = `package p func f() ` if got != want { t.Fatalf("got:\n%s\nwant:\n%s\n", got, want) } } // TestChanType tests that the tree for <-(<-chan int), without // ParenExpr, is correctly formatted with parens. // Test case for issue #63362. func TestChanType(t *testing.T) { expr := &ast.UnaryExpr{ Op: token.ARROW, X: &ast.CallExpr{ Fun: &ast.ChanType{ Dir: ast.RECV,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 20.4K bytes - Viewed (0)