5 ms·
I've made changes to the Lua/LuaJIT lexer/Parser to have a C like syntax and a program to convert Lua syntax to LJS syntax you can see it in the repositories sh
by mingodad 2y ago
I've made changes to the Lua/LuaJIT lexer/Parser to have a C like syntax and a program to convert Lua syntax to LJS syntax you can see it in the repositories shown bellow, the C api and language semantics remain the same.
- https://github.com/mingodad/ljs https://github.com/mingodad/ljs
- https://github.com/mingodad/ljs-5.4 https://github.com/mingodad/ljs-5.4
- https://github.com/mingodad/ljs-5.1 https://github.com/mingodad/ljs-5.1
- https://github.com/mingodad/ljsjit https://github.com/mingodad/ljsjit
- https://github.com/mingodad/raptorjit-ljs https://github.com/mingodad/raptorjit-ljs
- https://github.com/mingodad/CorsixTH-ljs https://github.com/mingodad/CorsixTH-ljs
- https://github.com/mingodad/snabb-ljs https://github.com/mingodad/snabb-ljs
- https://github.com/mingodad/ZeroBraneStudioLJS https://github.com/mingodad/ZeroBraneStudioLJS
- kragen 2y agoCool! Did you fix new variables being global by default? What kind of checking is applied to the type annotations like `: string`?
- mingodad 2y agoNo changes to "global by default" and no checking are made to type annotations. The idea was to be able to convert any existing Lua code automatically and get it working as before like I did with some non trivial projects like: - https://github.com/mingodad/CorsixTH-ljs https://github.com/mingodad/CorsixTH-ljs - https://github.com/mingodad/ZeroBraneStudioLJS https://github.com/mingodad/ZeroBraneStudioLJS
- mingodad 2y agoBut I implemented a warning/error for variable shadowing.