casr icon indicating copy to clipboard operation
casr copied to clipboard

Support Lua programming language

Open ligurio opened this issue 2 months ago • 0 comments

It would be useful to support Lua programming language in CASR the same way as Python (casr-python) and Javascript (casr-js) programming languages.

On an unhandled error, Lua generates a traceback like below:

LuaJIT:

[0] ~/sources$ luajit -e "error('crash')"
luajit: (command line):1: crash
stack traceback:
        [C]: in function 'error'
        (command line):1: in main chunk
        [C]: at 0x63a219b032e0

Lua:

[0] ~/sources$ lua -e "error('crash')"
lua: (command line):1: crash
stack traceback:
        [C]: in function 'error'
        (command line):1: in main chunk
        [C]: in ?
[0] ~/sources$ 

Manually traceback can be generated with debug.traceback("message") ^3, error("message") ^2, see ^1.

ligurio avatar May 02 '24 14:05 ligurio