Mercurial Hosting > luan
diff website/src/diff.html @ 1521:d3e61cd2aca0
docs and shell bug fix
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 25 Jun 2020 23:17:14 -0600 |
parents | d9a5405a3102 |
children | 0af6a9d6d12f |
line wrap: on
line diff
--- a/website/src/diff.html Sun Jun 21 18:14:13 2020 -0600 +++ b/website/src/diff.html Thu Jun 25 23:17:14 2020 -0600 @@ -2,6 +2,7 @@ <html> <head> <title>How Luan differs from Lua</title> + <meta name="viewport" content="width=device-width, initial-scale=1"> <style> @import "site.css"; </style> @@ -92,11 +93,11 @@ <p>Luan has no global environment at all, no <code>_G</code>. By default, Luan doesn't define <code>_ENV</code> either, but if you define it as a local table in a chunk, then it acts like it does in Lua. When <code>_ENV</code> isn't defined, there are no global variables and an unrecognized variable name produces a compile error.</p> -<p>Every module is initialized with two local functions: <code>require</code> and <code>java</code>. The module then uses these functions to get access to whatever else it needs.</p> +<p>Every module is initialized with one local function: <code>require</code>. The module then uses this function to get access to whatever else it needs.</p> <h3 heading><a name="error" href="#error">Error Handling</a></h3> -<p>Luan has the functions <code>error</code> but does not have <code>pcall</code> or <code>xpcall</code>. Luan adds the <a href="#try">try statement</a> instead. Luan errors are implemented as an error table, not as a message object.</p> +<p>Luan has the function <code>error</code> but does not have <code>pcall</code> or <code>xpcall</code>. Luan adds the <a href="#try">try statement</a> instead. Luan errors are implemented as an error table, not as a message object.</p> <h3 heading><a name="meta" href="#meta">Metatables and Metamethods</a></h3> @@ -129,7 +130,7 @@ <h3 heading><a name="stmt" href="#stmt">Statements</a></h3> -<p>Luan adds the block terminators <b>end_do</b>, <b>end_for</b>, <b>end_function</b>, <b>end_if</b>, and <b>end_while</b>. These can be used to end the appropriate block type, but <b>end</b> can also be used to end any block.</p> +<p>Luan adds the block terminators <b>end_do</b>, <b>end_for</b>, <b>end_function</b>, <b>end_if</b>, <b>end_try</b>, and <b>end_while</b>. These can be used to end the appropriate block type, but <b>end</b> can also be used to end any block.</p> <p>Most statements in Luan are the same as Lua. Only those statements that differ will be listed here.</p>