- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 43 for ParenExpr (0.15 sec)
-
src/cmd/compile/internal/inline/interleaved/interleaved.go
// // To mitigate this, each matched node n is wrapped in a ParenExpr, // so we can reliably replace n in-place by assigning ParenExpr.X. // It's safe to use ParenExpr here, because typecheck already // removed them all. var parens []*ir.ParenExpr var mark func(ir.Node) ir.Node mark = func(n ir.Node) ir.Node { if _, ok := n.(*ir.ParenExpr); ok { return n // already visited n.X before wrapping }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 27 20:42:52 UTC 2024 - 5.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/util.go
// license that can be found in the LICENSE file. package astutil import "go/ast" // Unparen returns e with any enclosing parentheses stripped. func Unparen(e ast.Expr) ast.Expr { for { p, ok := e.(*ast.ParenExpr) if !ok { return e } e = p.X }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 08 01:33:44 UTC 2021 - 371 bytes - Viewed (0) -
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/ast.go
Rbrace token.Pos // position of "}" Incomplete bool // true if (source) expressions are missing in the Elts list } // A ParenExpr node represents a parenthesized expression. ParenExpr struct { Lparen token.Pos // position of "(" X Expr // parenthesized expression Rparen token.Pos // position of ")" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 35.6K bytes - Viewed (0) -
src/cmd/fix/cftype.go
if n == nil { return } // Find pattern like (*a.b)(x) c, ok := n.(*ast.CallExpr) if !ok { return } if len(c.Args) != 1 { return } p, ok := c.Fun.(*ast.ParenExpr) if !ok { return } s, ok := p.X.(*ast.StarExpr) if !ok { return } t, ok := s.X.(*ast.SelectorExpr) if !ok { return } pkg, ok := t.X.(*ast.Ident)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 00:25:49 UTC 2023 - 3.5K bytes - Viewed (0) -
src/go/printer/nodes.go
// pretend this is an *ast.ParenExpr and do nothing. break } h4, h5, mp := walkBinary(l) has4 = has4 || h4 has5 = has5 || h5 maxProblem = max(maxProblem, mp) } switch r := e.Y.(type) { case *ast.BinaryExpr: if r.Op.Precedence() <= e.Op.Precedence() { // parens will be inserted. // pretend this is an *ast.ParenExpr and do nothing. break }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go
case *ast.KeyValueExpr: return 1 << nKeyValueExpr case *ast.LabeledStmt: return 1 << nLabeledStmt case *ast.MapType: return 1 << nMapType case *ast.Package: return 1 << nPackage case *ast.ParenExpr: return 1 << nParenExpr case *ast.RangeStmt: return 1 << nRangeStmt case *ast.ReturnStmt: return 1 << nReturnStmt case *ast.SelectStmt: return 1 << nSelectStmt case *ast.SelectorExpr:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 4.8K bytes - Viewed (0) -
src/go/types/exprstring.go
buf.WriteString(" literal)") // shortened case *ast.CompositeLit: WriteExpr(buf, x.Type) buf.WriteByte('{') if len(x.Elts) > 0 { buf.WriteString("…") } buf.WriteByte('}') case *ast.ParenExpr: buf.WriteByte('(') WriteExpr(buf, x.X) buf.WriteByte(')') case *ast.SelectorExpr: WriteExpr(buf, x.X) buf.WriteByte('.') buf.WriteString(x.Sel.Name)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 08 19:31:44 UTC 2024 - 4.8K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
case *ast.LabeledStmt: children = append(children, tok(n.Colon, len(":"))) case *ast.MapType: children = append(children, tok(n.Map, len("map"))) case *ast.ParenExpr: children = append(children, tok(n.Lparen, len("(")), tok(n.Rparen, len(")"))) case *ast.RangeStmt: children = append(children, tok(n.For, len("for")),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 15.9K 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)