lua-users home
lua-l archive

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


hello, "steve donovan" <steve.j.donovan@gmail.com>.

On Tue, 30 Oct 2007 14:54:42 +0200
"steve donovan" <steve.j.donovan@gmail.com> wrote:

> Consider this:
> 
> def test()
> {
>     a = 10
>     if (a > 4) {
>         print 'was larger'
>         if (a > 6) {
>             print 'larger than 6'
>             if (a > 10) {			
>                 print 'bonanza'
>             } else if (a > 8) {
>                 print 'payola'
>             } else {
>                 print 'bonus'
>             }
>         }
>     }
> }
> 
> After mucking around with a token filter for a few hours, I got this
> to compile correctly. It 'looks' like a bastardized JavaScript, but it
> actually is Lua. The semantics are the same, and the transformation
> was fairly simple (110 lines of Lua).
it's NOT Lua. it's bastardized Python vomiting JS.