Comments (11)
Yes, the next feature in plan is to support multi lua version.
from lua-language-server.
That's great news! Will that include LuaJIT? As it has a few syntactic changes that the current parser can't handle:
from lua-language-server.
LuaJIT is also in plan, but not include in next feature. I've never used LuaJIT before, so I need to study the grammar of LuaJIT first.
from lua-language-server.
That's fine, great to know you're still considering it. The grammar changes are very minor compared to regular Lua. I believe that the whole extent of the changes is mentioned here: http://luajit.org/extensions.html
from lua-language-server.
@z16 Could you please tell me the syntactic changes of LuaJIT? I didn't find them in http://luajit.org/extensions.html, for example 0ULL
.
Is _VERSION == 'Lua 5.1'
in LuaJIT?
from lua-language-server.
The only changes to the parser that I'm aware of are mentioned at the very bottom of this page:
http://luajit.org/ext_ffi_api.html
To quote:
Extensions to the Lua Parser
The parser for Lua source code treats numeric literals with the suffixes LL
or ULL
as signed or unsigned 64 bit integers. Case doesn't matter, but uppercase is recommended for readability. It handles both decimal (42LL
) and hexadecimal (0x2aLL
) literals.
The imaginary part of complex numbers can be specified by suffixing number literals with i
or I
, e.g. 12.5i
. Caveat: you'll need to use 1i
to get an imaginary part with the value one, since i
itself still refers to a variable named i
.
And yes to the other question:
z16@DESKTOP-MRD0N1S:~$ luajit
LuaJIT 2.0.2 -- Copyright (C) 2005-2013 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
> =_VERSION
Lua 5.1
from lua-language-server.
Thank you!
from lua-language-server.
Just wanted to say that I tried it, and it works great!
The only thing is... we currently use the LuaJIT 2.1 beta, and it supports Lua 5.3's unicode literals:
This is only for LuaJIT 2.1. Would it be possible to also add support for that version?
I think that's the only syntax difference between the two. Since it's still a beta, it's not final, but it has been in beta for a few years now, and I don't know when it will be released, so I would prefer not to wait, if possible :)
Here are some documentation pages for the 2.1 beta, if it helps:
https://htmlpreview.github.io/?https://github.com/LuaJIT/LuaJIT/blob/v2.1/doc/extensions.html
https://htmlpreview.github.io/?https://github.com/LuaJIT/LuaJIT/blob/v2.1/doc/ext_ffi_api.html
from lua-language-server.
Is there any other issue with this feature?
from lua-language-server.
Not that I noticed, everything else seems good so far.
from lua-language-server.
Feedback is welcome if you find any problems.
from lua-language-server.
Related Issues (20)
- 函数参数设置为 alias[] or enum[] 类型, 在调用时无提示
- Trailing slash for rootUri will duplicate folder name HOT 1
- Do not shadow/re-inject fields in child-classes HOT 1
- @overload not as expected check param in class instance
- Possible typo when handling `workspace.library`
- [Feature request] Support for the upvalue limit HOT 1
- neovim补全项对比vscode下有缺漏
- generic in the loop HOT 1
- Collapsing of functions in the editor breaks if there is a comment before and after the function declaration
- How to link to treesitter folder from `workspace.library`? HOT 3
- VSCode pop-up error `Request textDocument/documentSymbol failed.` when typing
- When using alias values as its keys, Dictionary types don't give completion when defining an instance of that dictionary
- Error returning derived classes
- Optional not removed in if/elseif block for field in filter
- 目录重命名, 移动目录, 在自动修改req路径时, 新路径会出现多余字符, 或者不修改
- [Future Ruquest] Add tracking for `rawset()` in function runtime and etc
- [Feature Request] Support custom file extension
- Command line doc_out_path arg doesn't work
- Missing fields on inherited class not resulting in diagnostics warnings
- Function with generic variable return type loses typing after first return
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-language-server.