diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-08-16 21:21:59 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-08-16 21:24:40 -0400 |
| commit | 25bf556f9434f557171b040fc2945eacb112ba8c (patch) | |
| tree | 5663173a187e05f3c1d44b5cbdf19a404aa56991 /docs/doc | |
| parent | 538a6ab05b070080642e751175425f38f6b33d8e (diff) | |
Document what programs and errors are
Diffstat (limited to 'docs/doc')
| -rw-r--r-- | docs/doc/glossary.html | 1 | ||||
| -rw-r--r-- | docs/doc/syntax.html | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/docs/doc/glossary.html b/docs/doc/glossary.html index daf3ec43..d12b2b06 100644 --- a/docs/doc/glossary.html +++ b/docs/doc/glossary.html @@ -106,6 +106,7 @@ </ul> <h2 id="grammar"><a class="header" href="#grammar">Grammar</a></h2> <ul> +<li><a href="syntax.html"><strong>Program</strong></a>: The source code for a single BQN evaluation.</li> <li><a href="syntax.html#expressions"><strong>Expression</strong></a>: A piece of code that describes the computation of a value.</li> <li><a href="expression.html#nothing"><strong>Nothing</strong></a>: A special value-like entity that comes from <code><span class='Nothing'>·</span></code>, <code><span class='Value'>𝕨</span></code> in a function with no left argument, or a function called on nothing.</li> <li><strong>Statement</strong>: An expression, nothing (<code><span class='Nothing'>·</span></code>), or an export (<code><span class='Value'>var</span><span class='Gets'>⇐</span></code>).</li> diff --git a/docs/doc/syntax.html b/docs/doc/syntax.html index 23f1a3a2..fd55dafa 100644 --- a/docs/doc/syntax.html +++ b/docs/doc/syntax.html @@ -6,6 +6,7 @@ <div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">doc</a></div> <h1 id="syntax-overview"><a class="header" href="#syntax-overview">Syntax overview</a></h1> <p>BQN syntax consists of expressions where computation is done, with a little organizing structure around them like assignment, functions, and list notation. Expressions are where the programmer is in control, so the design tries to do as much as possible with them before introducing special syntax.</p> +<p>A <em>program</em> is a unit of source code that's evaluated, such as a source file, or one line of REPL input (one run of the <code><span class='Value'>bqn</span></code> executable often involves multiple programs). Like a <a href="#blocks">block</a>, it's a sequence of expressions to be evaluated in order. It has a result, which is used it the program was evaluated from BQN with <code><span class='Function'>•BQN</span></code>, <code><span class='Function'>•Import</span></code> or similar. An error might occur when a program is running; this ends execution unless it's <a href="assert.html#catch">caught</a>.</p> <h2 id="precedence"><a class="header" href="#precedence">Precedence</a></h2> <p>Here's a full table of precedence for BQN's glyphs (broader than "operator precedence", as an "operator" usually just corresponds to a function). Entries at the bottom make the biggest divisions in the program, while the ones further up are subdivisions.</p> <table> |
