aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authoralandonovan <adonovan@google.com>2019-01-03 16:32:47 -0500
committerGitHub <noreply@github.com>2019-01-03 16:32:47 -0500
commit58f91015e4f89b71b74618e374d8450e061260bf (patch)
tree3c61f7aad5d3bd5cb50d7eb028c920f2d1e63f4c /internal
parent82fc8c1ff39066eae0638c11e78613f0b2e2e612 (diff)
downloadstarlark-go-58f91015e4f89b71b74618e374d8450e061260bf.tar.gz
starlark: HasUnary: allow extension types to define +x, -x, ~x (#87)
This mirrors the treatment of HasBinary.
Diffstat (limited to 'internal')
-rw-r--r--internal/compile/compile.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/compile/compile.go b/internal/compile/compile.go
index 300d196..67f3ae8 100644
--- a/internal/compile/compile.go
+++ b/internal/compile/compile.go
@@ -266,8 +266,10 @@ var stackEffect = [...]int8{
SLICE: -3,
STAR: -1,
TRUE: +1,
+ UMINUS: 0,
UNIVERSAL: +1,
UNPACK: variableStackEffect,
+ UPLUS: 0,
}
func (op Opcode) String() string {