aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2018-11-30 11:57:57 -0800
committeralandonovan <adonovan@google.com>2018-11-30 14:57:57 -0500
commit8d353c1949df16ca68bc05df1c096a4778332c70 (patch)
tree63059ee3154a12f420dabddf041f2c593e67fd25 /internal
parentca226729a274ee201c1c2084928308de35c3f91f (diff)
downloadstarlark-go-8d353c1949df16ca68bc05df1c096a4778332c70.tar.gz
starlark: allow parenthesized expressions on LHS of augmented assignments (#29)
Fixes #25
Diffstat (limited to 'internal')
-rw-r--r--internal/compile/compile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/compile/compile.go b/internal/compile/compile.go
index 8da415b..479df5c 100644
--- a/internal/compile/compile.go
+++ b/internal/compile/compile.go
@@ -980,7 +980,7 @@ func (fcomp *fcomp) stmt(stmt syntax.Stmt) {
var set func()
// Evaluate "address" of x exactly once to avoid duplicate side-effects.
- switch lhs := stmt.LHS.(type) {
+ switch lhs := unparen(stmt.LHS).(type) {
case *syntax.Ident:
// x = ...
fcomp.lookup(lhs)