1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00

[language] convert identifier to string when used as the name in a pair

This commit is contained in:
Étienne Fildadut 2024-05-17 15:12:21 +02:00
parent b47e1940e9
commit 12eb1d8f68
6 changed files with 25 additions and 6 deletions

View file

@ -415,10 +415,15 @@ The `break` and `continue` functions from the standard library also return retur
Pairs associate two arbitrary values.
Pairs are built using the `_:_` identifier, with the left argument giving the name and the right the value of the pair.
Pairs are built using the `_:_` identifier, with the left argument giving the name and the right the value of the pair. If the left argument is an identifier, it will be converted to a string for convenience.
```
"name":"value"
"name":"value" -- is the same as
name:"value"
-- if you need to use the value associated with the `name` variable instead, the identifier can be wrapped in parentheses
:name = "key"
(name):"value"
```
### Tuple