aboutsummaryrefslogtreecommitdiff
path: root/docs/spec/scope.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-24 11:00:52 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-24 11:00:52 -0400
commit9bccc26a0c3231d7cc9adc37c1a850ef44fd436a (patch)
treed9ee03b98126b14423af4d07ae4fd7d84589f1aa /docs/spec/scope.html
parent3863c3837ded859328243ae42f524c45741c872e (diff)
Add breadcrumbs to generated html
Diffstat (limited to 'docs/spec/scope.html')
-rw-r--r--docs/spec/scope.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/spec/scope.html b/docs/spec/scope.html
index 95bb16c1..6e8dd6ac 100644
--- a/docs/spec/scope.html
+++ b/docs/spec/scope.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>Specification: BQN variable scoping</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
+<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">spec</a></div>
<h1 id="specification-bqn-variable-scoping">Specification: BQN variable scoping</h1>
<p>BQN uses lexical scoping for variables, where scopes correspond roughly to blocks, or pairs of curly braces separated by semicolons. At the top level in a scope, new variables are visible only after they are defined, but in the scopes it contains, all variables defined in that scope are visible. This system is specified more precisely below.</p>
<p>A running BQN program manipulates variables during its <a href="evaluate.html">execution</a>, but it is important to distinguish these variables from the identifiers that refer to them. As defined in the <a href="token.html">tokenization rules</a>, an identifier is a particular kind of token found in a program's source code. The lexical scoping rules in this page define which identifiers are considered the same; these identifiers will refer to the same variables when the program is run. While each variable has only one identifier, an identifier can refer to any number of variables because a new variable is created for that identifier each time its containing scope is instantiated (that is, each time the contents of the block are evaluated).</p>