aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax/operator_string.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-04-05 16:52:25 -0700
committerRobert Griesemer <gri@golang.org>2021-04-07 05:19:41 +0000
commit4bbe046aad2ca27f25d3811b061fb8f7926b8695 (patch)
treee26f09c7ef5564b85152b03a75b030d0243a1366 /src/cmd/compile/internal/syntax/operator_string.go
parent836356bdaad92d525d65ce01e08305dfbeb7c1e6 (diff)
downloadgo-4bbe046aad2ca27f25d3811b061fb8f7926b8695.tar.xz
cmd/compile/internal/syntax: add "~" operator
Change-Id: I7991103d97b97260d9615b7f5baf7ec75ad87d1f Reviewed-on: https://go-review.googlesource.com/c/go/+/307370 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/syntax/operator_string.go')
-rw-r--r--src/cmd/compile/internal/syntax/operator_string.go43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/cmd/compile/internal/syntax/operator_string.go b/src/cmd/compile/internal/syntax/operator_string.go
index a7cd40fb13..f045d8c552 100644
--- a/src/cmd/compile/internal/syntax/operator_string.go
+++ b/src/cmd/compile/internal/syntax/operator_string.go
@@ -11,30 +11,31 @@ func _() {
_ = x[Def-1]
_ = x[Not-2]
_ = x[Recv-3]
- _ = x[OrOr-4]
- _ = x[AndAnd-5]
- _ = x[Eql-6]
- _ = x[Neq-7]
- _ = x[Lss-8]
- _ = x[Leq-9]
- _ = x[Gtr-10]
- _ = x[Geq-11]
- _ = x[Add-12]
- _ = x[Sub-13]
- _ = x[Or-14]
- _ = x[Xor-15]
- _ = x[Mul-16]
- _ = x[Div-17]
- _ = x[Rem-18]
- _ = x[And-19]
- _ = x[AndNot-20]
- _ = x[Shl-21]
- _ = x[Shr-22]
+ _ = x[Tilde-4]
+ _ = x[OrOr-5]
+ _ = x[AndAnd-6]
+ _ = x[Eql-7]
+ _ = x[Neq-8]
+ _ = x[Lss-9]
+ _ = x[Leq-10]
+ _ = x[Gtr-11]
+ _ = x[Geq-12]
+ _ = x[Add-13]
+ _ = x[Sub-14]
+ _ = x[Or-15]
+ _ = x[Xor-16]
+ _ = x[Mul-17]
+ _ = x[Div-18]
+ _ = x[Rem-19]
+ _ = x[And-20]
+ _ = x[AndNot-21]
+ _ = x[Shl-22]
+ _ = x[Shr-23]
}
-const _Operator_name = ":!<-||&&==!=<<=>>=+-|^*/%&&^<<>>"
+const _Operator_name = ":!<-~||&&==!=<<=>>=+-|^*/%&&^<<>>"
-var _Operator_index = [...]uint8{0, 1, 2, 4, 6, 8, 10, 12, 13, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 30, 32}
+var _Operator_index = [...]uint8{0, 1, 2, 4, 5, 7, 9, 11, 13, 14, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 31, 33}
func (i Operator) String() string {
i -= 1