[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Chunk?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 5 Jun 2012 17:08:23 +0200
2012/6/5 Emeka <emekamicro@gmail.com>:
>
> What is "CHUNK"?
The Lua interpreter works like this:
1. You type in something and hit return.
2. If it is obviously unfinished (e.g. a closing `)`, `}`, `]`, `end`
has not yet been supplied) the interpreter goes back to Step 1;
what you type in now gets appended to what you typed in before.
3. If it is not obviously unfinished, everything you typed in makes
one chunk. Lua will now try to compile it and execute it.
If you "dofile" something, the whole file is treated as one chunk.