diff options
author | uhziel <uhziel@gmail.com> | 2020-12-11 16:12:56 +0800 |
---|---|---|
committer | uhziel <uhziel@gmail.com> | 2020-12-11 16:12:56 +0800 |
commit | 93cdf898f5eb8282dba0d684f926e26c6a9f7dbd (patch) | |
tree | 1479b7923cf7afdba0b792bda824165d1bfa3fd2 /script/parser | |
parent | 64e62cfefbeff094b2d168ed5d0d31d48736c89b (diff) | |
download | lua-language-server-93cdf898f5eb8282dba0d684f926e26c6a9f7dbd.zip |
通过不向前推断、在vm缓存doc.class查询fields来加快分析速度
Diffstat (limited to 'script/parser')
-rw-r--r-- | script/parser/guide.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index 022be26d..fcf96aa2 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -1242,6 +1242,10 @@ function m.isDoc(source) return source.type:sub(1, 4) == 'doc.' end +function m.isDocClass(source) + return source.type == 'doc.class' +end + --- 根据函数的调用参数,获取:调用,参数索引 function m.getCallAndArgIndex(callarg) local callargs = callarg.parent |