- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for OpPos (0.05 sec)
-
src/go/types/expr.go
} // x is a constant so xval != nil and it must be of Int kind. x.val = constant.Shift(xval, op, uint(s)) x.expr = e opPos := x.Pos() if b, _ := e.(*ast.BinaryExpr); b != nil { opPos = b.OpPos } check.overflow(x, opPos) return } // non-constant shift with constant lhs if isUntyped(x.typ) { // spec: "If the left operand of a non-constant shift
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/cmd/compile/internal/types2/expr.go
return false } } else { check.errorf(x, InvalidSyntaxTree, "unknown operator %s", op) return false } return true } // opPos returns the position of the operator if x is an operation; // otherwise it returns the start position of x. func opPos(x syntax.Expr) syntax.Pos { switch op := x.(type) { case nil: return nopos // don't crash case *syntax.Operation: return op.Pos() default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 51.7K bytes - Viewed (0) -
src/go/parser/parser.go
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 { defer un(trace(p, "EmbeddedTerm")) } if p.tok == token.TILDE { t := new(ast.UnaryExpr) t.OpPos = p.pos t.Op = token.TILDE p.next()
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/nodes.go
p.expr1(x.X, prec, depth+diffPrec(x.X, prec)) if printBlank { p.print(blank) } xline := p.pos.Line // before the operator (it may be on the next line!) yline := p.lineFor(x.Y.Pos()) p.setPos(x.OpPos) p.print(x.Op) if xline != yline && xline > 0 && yline > 0 { // at least one line break, but respect an extra empty line // in the source if p.linebreak(yline, 1, ws, true) > 0 { ws = ignore
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0)