mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 14:46:03 +00:00
With Options::e4x set, an E4X name standing alone (@a, @ns::a, @[expr], ns::a, *) is now a valid target for =, compound assignment, ++, --, delete and for/for each loops, as well as a read. The target is the nearest XML or XMLList value in scope whose [[HasProperty]] accepts the name (ECMA-357 section 11.1). The name is evaluated once, and the target resolves before the right-hand side runs. When no XML value in scope holds the name, a read or write throws a ReferenceError and creates no child or attribute. A read no longer falls back to the first XML value in scope, so a filter such as list.(@id == '1') throws when an item has no @id and no outer XML value holds one, instead of treating that item as not matching.