summaryrefslogtreecommitdiff
path: root/chapter17/README.md
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2024-11-13 20:53:05 -0800
committerCliff Click <cliffc@acm.org>2024-11-23 09:03:20 -0800
commit477c71d89d107936cd0c4776bb2d5ff37cb91539 (patch)
treed2f4dcec5620a757b44615c0db515e5142900f49 /chapter17/README.md
parent3652f49f679de25a2544225d6a3600a63b693ba0 (diff)
downloadSimple-477c71d89d107936cd0c4776bb2d5ff37cb91539.tar.gz
Simple-477c71d89d107936cd0c4776bb2d5ff37cb91539.zip
Allow oper-assign, += -= etc
Diffstat (limited to 'chapter17/README.md')
-rw-r--r--chapter17/README.md14
1 files changed, 8 insertions, 6 deletions
diff --git a/chapter17/README.md b/chapter17/README.md
index 1bac940b..d65ff879 100644
--- a/chapter17/README.md
+++ b/chapter17/README.md
@@ -12,6 +12,14 @@ Also allows `s.fld++` and `ary[idx]++`, and their `--` variants.
Allow pre-increment for identifiers only, for now: `--pc`.
+## Operator assignment
+
+Along the same lines as post-increment, we now allow `op=` assignment
+with semantics similar to other languages.
+
+`x += y`
+
+
## var & val
`var` can be used in the `type` position to indicate a "variable" (mutable
@@ -125,11 +133,5 @@ return i; // ERROR: Undefined name 'i'
-oper-assign +=, -=
TODO
switch
-
-
-
-
-