diff options
| author | Cliff Click <cliffc@acm.org> | 2024-11-13 20:53:05 -0800 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2024-11-23 09:03:20 -0800 |
| commit | 477c71d89d107936cd0c4776bb2d5ff37cb91539 (patch) | |
| tree | d2f4dcec5620a757b44615c0db515e5142900f49 /chapter17/README.md | |
| parent | 3652f49f679de25a2544225d6a3600a63b693ba0 (diff) | |
| download | Simple-477c71d89d107936cd0c4776bb2d5ff37cb91539.tar.gz Simple-477c71d89d107936cd0c4776bb2d5ff37cb91539.zip | |
Allow oper-assign, += -= etc
Diffstat (limited to 'chapter17/README.md')
| -rw-r--r-- | chapter17/README.md | 14 |
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 - - - - - |
