- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for OpPos (0.05 sec)
-
src/cmd/compile/internal/types2/const.go
// arbitrarily large. func (check *Checker) overflow(x *operand, opPos syntax.Pos) { assert(x.mode == constant_) if x.val.Kind() == constant.Unknown { // TODO(gri) We should report exactly what went wrong. At the // moment we don't have the (go/constant) API for that. // See also TODO in go/constant/value.go. check.error(atPos(opPos), InvalidConstVal, "constant result is not representable") return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 7.5K bytes - Viewed (0) -
src/go/types/const.go
// arbitrarily large. func (check *Checker) overflow(x *operand, opPos token.Pos) { assert(x.mode == constant_) if x.val.Kind() == constant.Unknown { // TODO(gri) We should report exactly what went wrong. At the // moment we don't have the (go/constant) API for that. // See also TODO in go/constant/value.go. check.error(atPos(opPos), InvalidConstVal, "constant result is not representable") return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 7.6K bytes - Viewed (0) -
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/ast/ast.go
// Unary "*" expressions are represented via StarExpr nodes. // UnaryExpr struct { OpPos token.Pos // position of Op Op token.Token // operator X Expr // operand } // A BinaryExpr node represents a binary expression. BinaryExpr struct { X Expr // left operand OpPos token.Pos // position of Op Op token.Token // operator Y Expr // right operand }
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/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"BasicLit", Type, 0}, {"BasicLit.Kind", Field, 0}, {"BasicLit.Value", Field, 0}, {"BasicLit.ValuePos", Field, 0}, {"BinaryExpr", Type, 0}, {"BinaryExpr.Op", Field, 0}, {"BinaryExpr.OpPos", Field, 0}, {"BinaryExpr.X", Field, 0}, {"BinaryExpr.Y", Field, 0}, {"BlockStmt", Type, 0}, {"BlockStmt.Lbrace", Field, 0}, {"BlockStmt.List", Field, 0}, {"BlockStmt.Rbrace", Field, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)