1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

docs: add variables; rework scope (#11062)

Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
This commit is contained in:
Ryan Hendrickson 2024-07-31 17:39:43 -04:00 committed by GitHub
parent b24757f08a
commit 6ed67d35ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 35 additions and 10 deletions

View file

@ -0,0 +1,10 @@
# Variables
A *variable* is an [identifier](identifiers.md) used as an expression.
> **Syntax**
>
> *expression* → *identifier*
A variable must have the same name as a definition in the [scope](./scope.md) that encloses it.
The value of a variable is the value of the corresponding expression in the enclosing scope.