lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Aug 26, 2015 at 8:33 PM, Nan Xiao <xiaonan830818@gmail.com> wrote:
> Hi all,
>
> According to Pil, the chunk is "simply a sequence of commands (or
> statements)". A function call is
> an expression. So for "print("Hello")", it is just an expression, not a
> statement or chunk, right?
>
> Thanks in advance!
>
> Best Regards
> Nan Xiao

The callable object creating by parsing the code "print('Hello')" is a
chunk containing a single statement that contains a function call
expression.

You generally don't deal in chunks directly unless you're using the
load() function.

/s/ Adam