reorder columns

this is for a simpler transformation into a series of subsections
This commit is contained in:
Valentin Gagarin 2022-12-22 21:18:05 +01:00
parent 15341334b5
commit caebe4112e

View file

@ -3,26 +3,26 @@
The table below lists the operators in the Nix language, in The table below lists the operators in the Nix language, in
order of precedence (from strongest to weakest binding). order of precedence (from strongest to weakest binding).
| Name | Syntax | Associativity | Description | Precedence | | Name | Syntax | Description | Associativity | Precedence |
| ------------------------ | ----------------------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | | ------------------------ | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ---------- |
| Select | *e* `.` *attrpath* \[ `or` *def* \] | none | Select attribute denoted by the attribute path *attrpath* from set *e*. (An attribute path is a dot-separated list of attribute names.) If the attribute doesnt exist, return *def* if provided, otherwise abort evaluation. | 1 | | Select | *e* `.` *attrpath* \[ `or` *def* \] | Select attribute denoted by the attribute path *attrpath* from set *e*. (An attribute path is a dot-separated list of attribute names.) If the attribute doesnt exist, return *def* if provided, otherwise abort evaluation. | none | 1 |
| Application | *e1* *e2* | left | Call function *e1* with argument *e2*. | 2 | | Application | *e1* *e2* | Call function *e1* with argument *e2*. | left | 2 |
| Arithmetic Negation | `-` *e* | none | Arithmetic negation. | 3 | | Arithmetic Negation | `-` *e* | Arithmetic negation. | none | 3 |
| Has Attribute | *e* `?` *attrpath* | none | Test whether set *e* contains the attribute denoted by *attrpath*; return `true` or `false`. | 4 | | Has Attribute | *e* `?` *attrpath* | Test whether set *e* contains the attribute denoted by *attrpath*; return `true` or `false`. | none | 4 |
| List Concatenation | *e1* `++` *e2* | right | List concatenation. | 5 | | List Concatenation | *e1* `++` *e2* | List concatenation. | right | 5 |
| Multiplication | *e1* `*` *e2*, | left | Arithmetic multiplication. | 6 | | Multiplication | *e1* `*` *e2*, | Arithmetic multiplication. | left | 6 |
| Division | *e1* `/` *e2* | left | Arithmetic division. | 6 | | Division | *e1* `/` *e2* | Arithmetic division. | left | 6 |
| Addition | *e1* `+` *e2* | left | Arithmetic addition. | 7 | | Addition | *e1* `+` *e2* | Arithmetic addition. | left | 7 |
| Subtraction | *e1* `-` *e2* | left | Arithmetic subtraction. | 7 | | Subtraction | *e1* `-` *e2* | Arithmetic subtraction. | left | 7 |
| String Concatenation | *string1* `+` *string2* | left | String concatenation. | 7 | | String Concatenation | *string1* `+` *string2* | String concatenation. | left | 7 |
| Not | `!` *e* | none | Boolean negation. | 8 | | Not | `!` *e* | Boolean negation. | none | 8 |
| Update | *e1* `//` *e2* | right | Return a set consisting of the attributes in *e1* and *e2* (with the latter taking precedence over the former in case of equally named attributes). | 9 | | Update | *e1* `//` *e2* | Return a set consisting of the attributes in *e1* and *e2* (with the latter taking precedence over the former in case of equally named attributes). | right | 9 |
| Less Than | *e1* `<` *e2*, | none | Arithmetic/lexicographic comparison. | 10 | | Less Than | *e1* `<` *e2*, | Arithmetic/lexicographic comparison. | none | 10 |
| Less Than or Equal To | *e1* `<=` *e2* | none | Arithmetic/lexicographic comparison. | 10 | | Less Than or Equal To | *e1* `<=` *e2* | Arithmetic/lexicographic comparison. | none | 10 |
| Greater Than | *e1* `>` *e2* | none | Arithmetic/lexicographic comparison. | 10 | | Greater Than | *e1* `>` *e2* | Arithmetic/lexicographic comparison. | none | 10 |
| Greater Than or Equal To | *e1* `>=` *e2* | none | Arithmetic/lexicographic comparison. | 10 | | Greater Than or Equal To | *e1* `>=` *e2* | Arithmetic/lexicographic comparison. | none | 10 |
| Equality | *e1* `==` *e2* | none | Equality. | 11 | | Equality | *e1* `==` *e2* | Equality. | none | 11 |
| Inequality | *e1* `!=` *e2* | none | Inequality. | 11 | | Inequality | *e1* `!=` *e2* | Inequality. | none | 11 |
| Logical AND | *e1* `&&` *e2* | left | Logical AND. | 12 | | Logical AND | *e1* `&&` *e2* | Logical AND. | left | 12 |
| Logical OR | *e1* <code>&#124;&#124;</code> *e2* | left | Logical OR. | 13 | | Logical OR | *e1* <code>&#124;&#124;</code> *e2* | Logical OR. | left | 13 |
| Logical Implication | *e1* `->` *e2* | none | Logical implication (equivalent to <code>!e1 &#124;&#124; e2</code>). | 14 | | Logical Implication | *e1* `->` *e2* | Logical implication (equivalent to <code>!e1 &#124;&#124; e2</code>). | none | 14 |