- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for BinaryExpr (0.16 sec)
-
src/go/printer/nodes.go
// ---------------------------------------------------------------------------- // Expressions func walkBinary(e *ast.BinaryExpr) (has4, has5 bool, maxProblem int) { switch e.Op.Precedence() { case 4: has4 = true case 5: has5 = true } switch l := e.X.(type) { case *ast.BinaryExpr: if l.Op.Precedence() < e.Op.Precedence() { // parens will be inserted.
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/compile/internal/syntax/parser.go
// Expressions func (p *parser) expr() Expr { if trace { defer p.trace("expr")() } return p.binaryExpr(nil, 0) } // Expression = UnaryExpr | Expression binary_op Expression . func (p *parser) binaryExpr(x Expr, prec int) Expr { // don't trace binaryExpr - only leads to overly nested trace output if x == nil { x = p.unaryExpr() }
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/types/expr.go
return true } // opName returns the name of the operation if x is an operation // that might overflow; otherwise it returns the empty string. func opName(e ast.Expr) string { switch e := e.(type) { case *ast.BinaryExpr: if int(e.Op) < len(op2str2) { return op2str2[e.Op] } case *ast.UnaryExpr: if int(e.Op) < len(op2str1) { return op2str1[e.Op] } } return "" } var op2str1 = [...]string{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 49.7K bytes - Viewed (0) -
src/go/parser/parser.go
func (p *parser) embeddedElem(x ast.Expr) ast.Expr { if p.trace { defer un(trace(p, "EmbeddedElem")) } if x == nil { x = p.embeddedTerm() } for p.tok == token.OR { t := new(ast.BinaryExpr) t.OpPos = p.pos t.Op = token.OR p.next() t.X = x t.Y = p.embeddedTerm() x = t } return x } func (p *parser) embeddedTerm() ast.Expr { if p.trace {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 08 20:07:50 UTC 2023 - 72.2K bytes - Viewed (0) -
src/go/printer/testdata/parser.go
if p.trace { defer un(trace(p, "BinaryExpr")) } x := p.parseUnaryExpr(lhs) for prec := p.tok.Precedence(); prec >= prec1; prec-- { for p.tok.Precedence() == prec { pos, op := p.pos, p.tok p.next() if lhs { p.resolve(x) lhs = false } y := p.parseBinaryExpr(false, prec+1) x = &ast.BinaryExpr{p.checkExpr(x), pos, op, p.checkExpr(y)} } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 20:19:51 UTC 2023 - 50.5K bytes - Viewed (0) -
src/cmd/compile/internal/types2/expr.go
// goto Error // } // if e.Op == token.ARROW { // x.expr = e // return statement // receive operations may appear in statement context // } // case *syntax.BinaryExpr: // check.binary(x, e, e.X, e.Y, e.Op) // if x.mode == invalid { // goto Error // } case *syntax.Operation: if e.Y == nil { // unary expression if e.Op == syntax.Mul {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 51.7K bytes - Viewed (0)