Merge "Fix up Assignment table in MuranoPL Reference"

This commit is contained in:
Jenkins 2016-05-25 02:48:39 +00:00 committed by Gerrit Code Review
commit cd264ae257
1 changed files with 27 additions and 27 deletions

View File

@ -380,33 +380,33 @@ Assignments are single key dictionaries with a YAQL expression as a key
and arbitrary structure as a value. Such a construct is evaluated
as an assignment.
+----------------------------+-----------------------------------------------------------------------------------+
| Assignment | Explanation |
+============================+===================================================================================+
| | $x: value | | assigns ``value`` to the local variable ``$x`` |
+----------------------------+-----------------------------------------------------------------------------------+
| | $.x: value | | assign the value to the object's property |
| | $this.x: value | |
+----------------------------+-----------------------------------------------------------------------------------+
| | $.x: $.y | | copies the value of the property ``y`` to the property ``x`` |
+----------------------------+-----------------------------------------------------------------------------------+
| | $x: [$a, $b] | | sets ``$x`` to the array of two values: ``$a`` and ``$b`` |
+----------------------------+-----------------------------------------------------------------------------------+
| | $x: | | structures of any level of complexity can be evaluated |
| | SomeKey: | |
| | NestedKey: $variable | |
+----------------------------+-----------------------------------------------------------------------------------+
| | $.x[0]: value | | assigns the value to the first array entry of the ``x`` property |
+----------------------------+-----------------------------------------------------------------------------------+
| | $.x.append(): value | | appends the value to an array in the ``x`` property |
+----------------------------+-----------------------------------------------------------------------------------+
| | $.x.insert(1): value | | inserts the value into the position 1 |
+----------------------------+-----------------------------------------------------------------------------------+
| | $x: [$a, $b].delete(0) | | sets ``$x`` to the array without 0 index item |
+----------------------------+-----------------------------------------------------------------------------------+
| | $.x.key.subKey: value | | deep dictionary modification |
| | $.x[key][subKey]: value | |
+----------------------------+-----------------------------------------------------------------------------------+
+------------------------------+---------------------------------------------------------------------------------+
| Assignment | Explanation |
+==============================+=================================================================================+
| | $x: value | | assigns ``value`` to the local variable ``$x`` |
+------------------------------+---------------------------------------------------------------------------------+
| | $.x: value | | assign ``value`` to the object's property |
| | $this.x: value | |
+------------------------------+---------------------------------------------------------------------------------+
| | $.x: $.y | | copies the value of the property ``y`` to the property ``x`` |
+------------------------------+---------------------------------------------------------------------------------+
| | $x: [$a, $b] | | sets ``$x`` to the array of two values: ``$a`` and ``$b`` |
+------------------------------+---------------------------------------------------------------------------------+
| | $x: | | structures of any level of complexity can be evaluated |
| | SomeKey: | |
| | NestedKey: $variable | |
+------------------------------+---------------------------------------------------------------------------------+
| | $.x[0]: value | | assigns ``value`` to the first array entry of the ``x`` property |
+------------------------------+---------------------------------------------------------------------------------+
| | $.x: $.x.append(value) | | appends ``value`` to the array in the ``x`` property |
+------------------------------+---------------------------------------------------------------------------------+
| | $.x: $.x.insert(1, value) | | inserts ``value`` into position 1 of the array in the ``x`` property |
+------------------------------+---------------------------------------------------------------------------------+
| | $x: list($a, $b).delete(0) | | sets ``$x`` to the list without the item at index 0 |
+------------------------------+---------------------------------------------------------------------------------+
| | $.x.key.subKey: value | | deep dictionary modification |
| | $.x[key][subKey]: value | |
+------------------------------+---------------------------------------------------------------------------------+
Block constructs