diff options
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/src/language/operators.md | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/doc/manual/src/language/operators.md b/doc/manual/src/language/operators.md index e3a00d32b..0c8cc6f57 100644 --- a/doc/manual/src/language/operators.md +++ b/doc/manual/src/language/operators.md @@ -70,21 +70,21 @@ Associativity: left Precedence: 6 -## Addition +## Subtraction -> *e1* `+` *e2* +> *e1* `-` *e2* -Add numbers *e1* and *e2*. +Subtract numbers *e2* from *e1*. Associativity: left Precedence: 7 -## Subtraction +## Addition -> *e1* `-` *e2* +> *e1* `+` *e2* -Subtract numbers *e2* from *e1*. +Add numbers *e1* and *e2*. Associativity: left @@ -100,6 +100,44 @@ Associativity: left Precedence: 7 +## Path concatenation + +> *path1* `+` *path2* + +Concatenate two paths. +The result is a path. + +## Path and string concatenation + +> *path* `+` *string* + +Concatenate *path* with *string*. +The result is a path. + +> **Note** +> +> The string must not have a string context that refers to a store path. + +Associativity: left + +Precedence: 7 + +## String and path concatenation + +> *string* `+` *path* + +Concatenate *string* with *path*. +The result is a string. + +> **Important** +> +> The file or directory at *path* must exist and is copied to the store +> The path appears in the result as the corresponding store path. + +Associativity: left + +Precedence: 7 + ## Logical negation (`NOT`) > `!` *e* |