Mercurial Hosting > luan
changeset 695:5042e487d717
documentation
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 20 Apr 2016 21:09:48 -0600 |
parents | b620b8e1010f |
children | b21d82ee5756 |
files | website/src/manual.html.luan |
diffstat | 1 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/website/src/manual.html.luan Wed Apr 20 20:56:08 2016 -0600 +++ b/website/src/manual.html.luan Wed Apr 20 21:09:48 2016 -0600 @@ -1892,6 +1892,22 @@ +<h4 heading><a name="Luan.eval" href="#Luan.eval"><code>Luan.eval (text [, source_name])</code></a></h4> + +<p> +Evaluates <code>text</code> as a Luan expression. + +<p> +Could be defined as: + +<pre> + function Luan.eval(text,source_name) + return Luan.load( "return "..text, source_name or "eval" )() + end +</pre> + + + <h4 heading><a name="Luan.get_metatable" href="#Luan.get_metatable"><code>Luan.get_metatable (table)</code></a></h4> <p> @@ -1934,7 +1950,7 @@ -<h4 heading><a name="Luan.load" href="#Luan.load"><code>Luan.load (text, [source_name [env, [, allow_expression]]])</code></a></h4> +<h4 heading><a name="Luan.load" href="#Luan.load"><code>Luan.load (text, source_name [, env])</code></a></h4> <p> Loads a chunk. @@ -1951,9 +1967,6 @@ <p> If the <code>env</code> parameter is supplied, it becomes the <code>_ENV</code> of the chunk. -<p> -If the <code>allow_expression</code> parameter is <code>true</code> then the entire text can be nothing more than an expression in which case the chunk returns the value of this expression. - <h4 heading><a name="Luan.load_file" href="#Luan.load_file"><code>Luan.load_file ([file_uri])</code></a></h4>