|
On Wed, Aug 26, 2015 at 8:59 PM, Nan Xiao <xiaonan830818@gmail.com> wrote:
> Hi Coda,
>
>> a chunk containing a single statement that contains a function call
>> _expression_.
>
> Sorry, I am a little confused. If possible, could you spare a little time to
> explain the
> relationship among chunk, statement and _expression_?
Does the Lua grammar help?
"stat" is a statement. "exp" is an _expression_.
http://www.lua.org/manual/5.3/manual.html#9
Note: There is some overlap. Some statements also happen to be
expressions (and vice versa).
For example: "x" is an _expression_ (it expresses a value). "x = 5" is
a statement. "foo ()" is both.
The load function turns a chunk into a function.
http://www.lua.org/manual/5.3/manual.html#pdf-load
-Parke