From 4e254ba07aba2ee0f21cd7ec2811e279beb6a7a2 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 30 Jun 2022 10:27:47 -0400 Subject: =?UTF-8?q?Fix=20modified=20assignment=20spec=20to=20account=20for?= =?UTF-8?q?=20=C2=B7=20and=20[]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/evaluate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/evaluate.md') diff --git a/spec/evaluate.md b/spec/evaluate.md index de3aca44..1a4e4669 100644 --- a/spec/evaluate.md +++ b/spec/evaluate.md @@ -36,7 +36,7 @@ Assignment to `lhsArray` destructures the major cells of right-hand-side value ` A destructuring assignment is performed in program order, or equivalently index order, with each sub-assignment fully completed before beginning the next (a depth-first order). Thus if an assignment with `↩` encounters an error but it's caught with `⎊`, some of the assignment may have already been performed, changing variable values. -*Modified assignment* is the subject assignment rule `lhs Derv "↩" subExpr?`. In this case, `lhs` is evaluated as if it were a `subExpr` (the syntax is a subset of `subExpr`), and passed as an argument to `Derv`. The full application is `lhs Derv subExpr`, if `subExpr` is given, and `Derv lhs` otherwise. Its value is assigned to `lhs`, and is also the result of the modified assignment expression. +*Modified assignment* is the subject assignment rule `lhs Derv "↩" subExpr?`. This case results in an error if `lhs` contains `"·"` or an empty `lhsArray` node (one with no `LHS_ELT` components). With these conditions, the grammar for `lhs` is a subset of `subExpr`; the node is evaluated as if it were a `subExpr`, and passed as an argument to `Derv`. The full application is `lhs Derv subExpr`, if `subExpr` is given, and `Derv lhs` otherwise. Its value is assigned to `lhs`, and is also the result of the modified assignment expression. ### Expressions -- cgit v1.2.3