lua-users home
lua-l archive

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


Hi Coda,

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_?

Thanks very much!


Best Regards
Nan Xiao

On Thu, Aug 27, 2015 at 11:44 AM, Coda Highland <chighland@gmail.com> wrote:
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