[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: JavaScript to Lua compiler
- From: "steve donovan" <steve.j.donovan@...>
- Date: Thu, 2 Oct 2008 15:32:30 +0200
On the face of it, many JavaScript constructs are going to translate
nicely, like
obj.method(function() {
dosomething();
})
to
obj:method(function()
dosomething()
end)
But how to tell when something's being called as a method? Lua
requires us to know this upfront so we can say ':' and ensure that the
self argument is passed implicitly.
Also, from my limiited experience, JavaScript is very permissive about
conversions which in Lua have to be explicit.
In short, it is much more of a compiler (deep semantic mapping) than a
translator that's needed.
steve d.
On Thu, Oct 2, 2008 at 3:21 PM, Mike Crowe <drmikecrowe@gmail.com> wrote:
> Hi Chetan,
>
> Nothing like this exists atm to my knowledge.
>
> Mike
>
> On Wed, Oct 1, 2008 at 7:35 PM, Chetan Singh <chetan_dhillon@yahoo.com>
> wrote:
>>
>> Hi,
>>
>> I am new to Lua and looking to compile JavaScript code to Lua so I can
>> execute my JavaScript code in Kahlua VM on J2ME devices. I heard there is a
>> compiler named Fusion or something which does exactly what I am looking for
>> but could not find any information on it. Is this tool available or is there
>> other tool that I can use to covert javascript to Lua.
>>
>> Thanks
>> Chetan
>>
>>
>>
>>
>
>